Klaus Demo nginx / a558afd
merge 2411: handle "/../" case more reliably Igor Sysoev 12 years ago
1 changed file(s) with 9 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
11221122 #endif
11231123 case '/':
11241124 state = sw_slash;
1125 u -= 4;
1126 if (u < r->uri.data) {
1127 return NGX_HTTP_PARSE_INVALID_REQUEST;
1128 }
1129 while (*(u - 1) != '/') {
1125 u -= 5;
1126 for ( ;; ) {
1127 if (u < r->uri.data) {
1128 return NGX_HTTP_PARSE_INVALID_REQUEST;
1129 }
1130 if (*u == '/') {
1131 u++;
1132 break;
1133 }
11301134 u--;
11311135 }
11321136 break;