nginx-0.3.50-RELEASE import
*) Change: the "proxy_redirect_errors" and "fastcgi_redirect_errors"
directives was renamed to the "proxy_intercept_errors" and
"fastcgi_intercept_errors" directives.
*) Feature: the ngx_http_charset_module supports the recoding from the
single byte encodings to the UTF-8 encoding and back.
*) Feature: the "X-Accel-Charset" response header line is supported in
proxy and FastCGI mode.
*) Bugfix: the "\" escape symbol in the "\"" and "\'" pairs in the SSI
command was removed only if the command also has the "$" symbol.
*) Bugfix: the "<!--" string might be added on some conditions in the
SSI after inclusion.
*) Bugfix: if the "Content-Length: 0" header line was in response, then
in nonbuffered proxying mode the client connection was not closed.
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index 426aa8a..24b7f8c 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -337,13 +337,13 @@
r->quoted_uri = 1;
state = sw_uri;
break;
- case '+':
- r->plus_in_uri = 1;
- break;
case '?':
r->args_start = p + 1;
state = sw_uri;
break;
+ case '+':
+ r->plus_in_uri = 1;
+ break;
case '\0':
r->zero_in_uri = 1;
break;
@@ -366,9 +366,6 @@
r->uri_end = p;
r->http_minor = 9;
goto done;
- case '+':
- r->plus_in_uri = 1;
- break;
case '\0':
r->zero_in_uri = 1;
break;
@@ -828,6 +825,8 @@
r->uri_ext = u + 1;
*u++ = ch;
break;
+ case '+':
+ r->plus_in_uri = 1;
default:
*u++ = ch;
break;
@@ -853,6 +852,8 @@
case '?':
r->args_start = p;
goto done;
+ case '+':
+ r->plus_in_uri = 1;
default:
state = sw_usual;
*u++ = ch;
@@ -881,6 +882,8 @@
case '?':
r->args_start = p;
goto done;
+ case '+':
+ r->plus_in_uri = 1;
default:
state = sw_usual;
*u++ = ch;
@@ -917,6 +920,8 @@
*u++ = ch;
break;
#endif
+ case '+':
+ r->plus_in_uri = 1;
default:
state = sw_usual;
*u++ = ch;
@@ -952,6 +957,8 @@
case '?':
r->args_start = p;
goto done;
+ case '+':
+ r->plus_in_uri = 1;
default:
state = sw_usual;
*u++ = ch;
@@ -992,8 +999,6 @@
if (ch == '\0') {
r->zero_in_uri = 1;
- *u++ = ch;
- ch = *p++;
}
state = quoted_state;
@@ -1003,10 +1008,15 @@
c = (u_char) (ch | 0x20);
if (c >= 'a' && c <= 'f') {
ch = (u_char) ((decoded << 4) + c - 'a' + 10);
+
if (ch == '?') {
*u++ = ch;
ch = *p++;
+
+ } else if (ch == '+') {
+ r->plus_in_uri = 1;
}
+
state = quoted_state;
break;
}