Mercurial > hg > nginx-quic
comparison src/http/ngx_http_parse.c @ 3091:ecc8d537e9a9 stable-0.7
handle "/../" case more reliably
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 07 Sep 2009 09:29:41 +0000 |
parents | 1ecd37f610c0 |
children | d41c740f55ce |
comparison
equal
deleted
inserted
replaced
3090:1ecd37f610c0 | 3091:ecc8d537e9a9 |
---|---|
1132 #if (NGX_WIN32) | 1132 #if (NGX_WIN32) |
1133 case '\\': | 1133 case '\\': |
1134 #endif | 1134 #endif |
1135 case '/': | 1135 case '/': |
1136 state = sw_slash; | 1136 state = sw_slash; |
1137 u -= 4; | 1137 u -= 5; |
1138 if (u < r->uri.data) { | 1138 for ( ;; ) { |
1139 return NGX_HTTP_PARSE_INVALID_REQUEST; | 1139 if (u < r->uri.data) { |
1140 } | 1140 return NGX_HTTP_PARSE_INVALID_REQUEST; |
1141 while (*(u - 1) != '/') { | 1141 } |
1142 if (*u == '/') { | |
1143 u++; | |
1144 break; | |
1145 } | |
1142 u--; | 1146 u--; |
1143 } | 1147 } |
1144 break; | 1148 break; |
1145 case '%': | 1149 case '%': |
1146 quoted_state = state; | 1150 quoted_state = state; |