comparison src/core/ngx_string.c @ 328:26ff8d6b618d NGINX_0_5_34

nginx 0.5.34 *) Change: now the full request line instead of URI only is written to error_log. *) Feature: Cygwin compatibility. Thanks to Vladimir Kutakov. *) Feature: the "merge_slashes" directive. *) Feature: the "gzip_vary" directive. *) Feature: the "server_tokens" directive. *) Feature: the "access_log" directive may be used inside the "limit_except" block. *) Bugfix: if the $server_protocol was used in FastCGI parameters and a request line length was near to the "client_header_buffer_size" directive value, then nginx issued an alert "fastcgi: the request record is too big". *) Bugfix: if a plain text HTTP/0.9 version request was made to HTTPS server, then nginx returned usual response. *) Bugfix: URL double escaping in a redirect of the "msie_refresh" directive; bug appeared in 0.5.28. *) Bugfix: a segmentation fault might occur in worker process if subrequests were used. *) Bugfix: the big responses may be transferred truncated if SSL and gzip were used. *) Bugfix: compatibility with mget. *) Bugfix: nginx did not unescape URI in the "include" SSI command. *) Bugfix: the segmentation fault was occurred on start or while reconfiguration if variable was used in the "charset" or "source_charset" directives. *) Bugfix: nginx returned the 400 response on requests like "GET http://www.domain.com HTTP/1.0". Thanks to James Oakley. *) Bugfix: a segmentation fault occurred in worker process if $date_local and $date_gmt were used outside the ngx_http_ssi_filter_module. *) Bugfix: a segmentation fault might occur in worker process if debug log was enabled. Thanks to Andrei Nigmatulin. *) Bugfix: ngx_http_memcached_module did not set $upstream_response_time. Thanks to Maxim Dounin. *) Bugfix: a worker process may got caught in an endless loop, if the memcached was used.
author Igor Sysoev <http://sysoev.ru>
date Thu, 13 Dec 2007 00:00:00 +0300
parents f70f2f565fe0
children
comparison
equal deleted inserted replaced
327:cb962a94cd7b 328:26ff8d6b618d
1145 1145
1146 static uint32_t refresh[] = { 1146 static uint32_t refresh[] = {
1147 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ 1147 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */
1148 1148
1149 /* ?>=< ;:98 7654 3210 /.-, +*)( '&%$ #"! */ 1149 /* ?>=< ;:98 7654 3210 /.-, +*)( '&%$ #"! */
1150 0x000000a5, /* 0000 0000 0000 0000 0000 0000 1010 0101 */ 1150 0x00000085, /* 0000 0000 0000 0000 0000 0000 1000 0101 */
1151 1151
1152 /* _^]\ [ZYX WVUT SRQP ONML KJIH GFED CBA@ */ 1152 /* _^]\ [ZYX WVUT SRQP ONML KJIH GFED CBA@ */
1153 0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */ 1153 0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */
1154 1154
1155 /* ~}| {zyx wvut srqp onml kjih gfed cba` */ 1155 /* ~}| {zyx wvut srqp onml kjih gfed cba` */
1241 1241
1242 ch = *s++; 1242 ch = *s++;
1243 1243
1244 switch (state) { 1244 switch (state) {
1245 case sw_usual: 1245 case sw_usual:
1246 if (ch == '?' && type == NGX_UNESCAPE_URI) { 1246 if (ch == '?'
1247 && (type & (NGX_UNESCAPE_URI|NGX_UNESCAPE_REDIRECT)))
1248 {
1247 *d++ = ch; 1249 *d++ = ch;
1248 goto done; 1250 goto done;
1249 } 1251 }
1250 1252
1251 if (ch == '%') { 1253 if (ch == '%') {
1284 state = sw_usual; 1286 state = sw_usual;
1285 1287
1286 if (ch >= '0' && ch <= '9') { 1288 if (ch >= '0' && ch <= '9') {
1287 ch = (u_char) ((decoded << 4) + ch - '0'); 1289 ch = (u_char) ((decoded << 4) + ch - '0');
1288 1290
1289 if (type == NGX_UNESCAPE_URI) { 1291 if (type & NGX_UNESCAPE_REDIRECT) {
1290 if (ch > '%' && ch < 0x7f) { 1292 if (ch > '%' && ch < 0x7f) {
1291 *d++ = ch; 1293 *d++ = ch;
1292 break; 1294 break;
1293 } 1295 }
1294 1296
1304 1306
1305 c = (u_char) (ch | 0x20); 1307 c = (u_char) (ch | 0x20);
1306 if (c >= 'a' && c <= 'f') { 1308 if (c >= 'a' && c <= 'f') {
1307 ch = (u_char) ((decoded << 4) + c - 'a' + 10); 1309 ch = (u_char) ((decoded << 4) + c - 'a' + 10);
1308 1310
1309 if (type == NGX_UNESCAPE_URI) { 1311 if (type & NGX_UNESCAPE_URI) {
1312 if (ch == '?') {
1313 *d++ = ch;
1314 goto done;
1315 }
1316
1317 *d++ = ch;
1318 break;
1319 }
1320
1321 if (type & NGX_UNESCAPE_REDIRECT) {
1310 if (ch == '?') { 1322 if (ch == '?') {
1311 *d++ = ch; 1323 *d++ = ch;
1312 goto done; 1324 goto done;
1313 } 1325 }
1314 1326