comparison src/http/ngx_http_parse.c @ 676:bfa81a0490a2 NGINX_1_3_1

nginx 1.3.1 *) Security: now nginx/Windows ignores trailing dot in URI path component, and does not allow URIs with ":$" in it. Thanks to Vladimir Kochetkov, Positive Research Center. *) Feature: the "proxy_pass", "fastcgi_pass", "scgi_pass", "uwsgi_pass" directives, and the "server" directive inside the "upstream" block, now support IPv6 addresses. *) Feature: the "resolver" directive now support IPv6 addresses and an optional port specification. *) Feature: the "least_conn" directive inside the "upstream" block. *) Feature: it is now possible to specify a weight for servers while using the "ip_hash" directive. *) Bugfix: a segmentation fault might occur in a worker process if the "image_filter" directive was used; the bug had appeared in 1.3.0. *) Bugfix: nginx could not be built with ngx_cpp_test_module; the bug had appeared in 1.1.12. *) Bugfix: access to variables from SSI and embedded perl module might not work after reconfiguration. Thanks to Yichun Zhang. *) Bugfix: in the ngx_http_xslt_filter_module. Thanks to Kuramoto Eiji. *) Bugfix: memory leak if $geoip_org variable was used. Thanks to Denis F. Latypoff. *) Bugfix: in the "proxy_cookie_domain" and "proxy_cookie_path" directives.
author Igor Sysoev <http://sysoev.ru>
date Tue, 05 Jun 2012 00:00:00 +0400
parents ad45b044f1e5
children 6db6e93f55ee
comparison
equal deleted inserted replaced
675:7052a9379344 676:bfa81a0490a2
541 break; 541 break;
542 } 542 }
543 543
544 switch (ch) { 544 switch (ch) {
545 case '/': 545 case '/':
546 #if (NGX_WIN32)
547 if (r->uri_ext == p) {
548 r->complex_uri = 1;
549 state = sw_uri;
550 break;
551 }
552 #endif
546 r->uri_ext = NULL; 553 r->uri_ext = NULL;
547 state = sw_after_slash_in_uri; 554 state = sw_after_slash_in_uri;
548 break; 555 break;
549 case '.': 556 case '.':
550 r->uri_ext = p + 1; 557 r->uri_ext = p + 1;
1115 } 1122 }
1116 1123
1117 switch(ch) { 1124 switch(ch) {
1118 #if (NGX_WIN32) 1125 #if (NGX_WIN32)
1119 case '\\': 1126 case '\\':
1127 if (u - 2 >= r->uri.data
1128 && *(u - 1) == '.' && *(u - 2) != '.')
1129 {
1130 u--;
1131 }
1132
1120 r->uri_ext = NULL; 1133 r->uri_ext = NULL;
1121 1134
1122 if (p == r->uri_start + r->uri.len) { 1135 if (p == r->uri_start + r->uri.len) {
1123 1136
1124 /* 1137 /*
1132 state = sw_slash; 1145 state = sw_slash;
1133 *u++ = '/'; 1146 *u++ = '/';
1134 break; 1147 break;
1135 #endif 1148 #endif
1136 case '/': 1149 case '/':
1150 #if (NGX_WIN32)
1151 if (u - 2 >= r->uri.data
1152 && *(u - 1) == '.' && *(u - 2) != '.')
1153 {
1154 u--;
1155 }
1156 #endif
1137 r->uri_ext = NULL; 1157 r->uri_ext = NULL;
1138 state = sw_slash; 1158 state = sw_slash;
1139 *u++ = ch; 1159 *u++ = ch;
1140 break; 1160 break;
1141 case '%': 1161 case '%':