comparison src/http/ngx_http_parse.c @ 1585:4435ca2e467d

merge_slashes
author Igor Sysoev <igor@sysoev.ru>
date Thu, 18 Oct 2007 11:36:58 +0000
parents 25427a0e9559
children 364587232429
comparison
equal deleted inserted replaced
1584:25427a0e9559 1585:4435ca2e467d
906 return NGX_HTTP_PARSE_HEADER_DONE; 906 return NGX_HTTP_PARSE_HEADER_DONE;
907 } 907 }
908 908
909 909
910 ngx_int_t 910 ngx_int_t
911 ngx_http_parse_complex_uri(ngx_http_request_t *r) 911 ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
912 { 912 {
913 u_char c, ch, decoded, *p, *u; 913 u_char c, ch, decoded, *p, *u;
914 enum { 914 enum {
915 sw_usual = 0, 915 sw_usual = 0,
916 sw_slash, 916 sw_slash,
1014 } 1014 }
1015 1015
1016 switch(ch) { 1016 switch(ch) {
1017 #if (NGX_WIN32) 1017 #if (NGX_WIN32)
1018 case '\\': 1018 case '\\':
1019 break;
1019 #endif 1020 #endif
1020 case '/': 1021 case '/':
1022 if (merge_slashes) {
1023 *u++ = ch;
1024 }
1021 break; 1025 break;
1022 case '.': 1026 case '.':
1023 state = sw_dot; 1027 state = sw_dot;
1024 *u++ = ch; 1028 *u++ = ch;
1025 break; 1029 break;