comparison src/http/ngx_http_parse.c @ 54:bcb5fce0b038 NGINX_0_1_27

nginx 0.1.27 *) Feature: the "blocked" parameter of the "valid_referers" directive. *) Change: the errors while handling the request header now logged at "info" level. The server name and the "Host" and "Referer" header lines also logged. *) Change: the "Host" header line is also logged in error log. *) Feature: the proxy_pass_unparsed_uri directive. The special handling of the "://" symbols in URI, appeared in 0.1.11 version, now is canceled. *) Bugfix: nginx could not be built on FreeBSD and Linux, if the --without-ngx_http_auth_basic_module configuration parameter was used.
author Igor Sysoev <http://sysoev.ru>
date Mon, 28 Mar 2005 00:00:00 +0400
parents 0d75d65c642f
children 3050baa54a26
comparison
equal deleted inserted replaced
53:b6565ddf033b 54:bcb5fce0b038
703 ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r) 703 ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r)
704 { 704 {
705 u_char c, ch, decoded, *p, *u; 705 u_char c, ch, decoded, *p, *u;
706 enum { 706 enum {
707 sw_usual = 0, 707 sw_usual = 0,
708 sw_colon,
709 sw_colon_slash,
710 sw_slash, 708 sw_slash,
711 sw_dot, 709 sw_dot,
712 sw_dot_dot, 710 sw_dot_dot,
713 #if (NGX_WIN32) 711 #if (NGX_WIN32)
714 sw_dot_dot_dot, 712 sw_dot_dot_dot,
772 state = sw_quoted; 770 state = sw_quoted;
773 break; 771 break;
774 case '?': 772 case '?':
775 r->args_start = p; 773 r->args_start = p;
776 goto done; 774 goto done;
777 case ':':
778 state = sw_colon;
779 *u++ = ch;
780 break;
781 case '.': 775 case '.':
782 r->uri_ext = u + 1; 776 r->uri_ext = u + 1;
783 *u++ = ch; 777 *u++ = ch;
784 break; 778 break;
785 default: 779 default:
786 *u++ = ch;
787 break;
788 }
789 ch = *p++;
790 break;
791
792 case sw_colon:
793 switch(ch) {
794 #if (NGX_WIN32)
795 case '\\':
796 state = sw_colon_slash;
797 *u++ = '/';
798 break;
799 #endif
800 case '/':
801 state = sw_colon_slash;
802 *u++ = ch;
803 break;
804 case ':':
805 *u++ = ch;
806 break;
807 case '%':
808 quoted_state = state;
809 state = sw_quoted;
810 break;
811 case '?':
812 r->args_start = p;
813 goto done;
814 default:
815 state = sw_usual;
816 *u++ = ch;
817 break;
818 }
819 ch = *p++;
820 break;
821
822 case sw_colon_slash:
823 switch(ch) {
824 #if (NGX_WIN32)
825 case '\\':
826 state = sw_slash;
827 *u++ = '/';
828 break;
829 #endif
830 case '/':
831 state = sw_slash;
832 *u++ = ch;
833 break;
834 case '.':
835 state = sw_dot;
836 *u++ = ch;
837 break;
838 case '%':
839 quoted_state = state;
840 state = sw_quoted;
841 break;
842 case '?':
843 r->args_start = p;
844 goto done;
845 default:
846 state = sw_usual;
847 *u++ = ch; 780 *u++ = ch;
848 break; 781 break;
849 } 782 }
850 ch = *p++; 783 ch = *p++;
851 break; 784 break;