comparison src/http/ngx_http_parse.c @ 204:e0bcfb77d6c7

nginx-0.0.1-2003-12-02-19:57:05 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 02 Dec 2003 16:57:05 +0000
parents 267ea1d98683
children 00cafae0bdf1
comparison
equal deleted inserted replaced
203:c9da5900c79e 204:e0bcfb77d6c7
795 return NGX_HTTP_PARSE_INVALID_REQUEST; 795 return NGX_HTTP_PARSE_INVALID_REQUEST;
796 796
797 case sw_quoted_second: 797 case sw_quoted_second:
798 if (ch >= '0' && ch <= '9') { 798 if (ch >= '0' && ch <= '9') {
799 ch = (decoded << 4) + ch - '0'; 799 ch = (decoded << 4) + ch - '0';
800 if (ch == '%') {
801 state = sw_usual;
802 *u++ = ch;
803 ch = *p++;
804 break;
805 }
800 state = quoted_state; 806 state = quoted_state;
801 break; 807 break;
802 } 808 }
803 809
804 c = ch | 0x20; 810 c = ch | 0x20;
805 if (c >= 'a' && c <= 'f') { 811 if (c >= 'a' && c <= 'f') {
806 ch = (decoded << 4) + c - 'a' + 10; 812 ch = (decoded << 4) + c - 'a' + 10;
813 if (ch == '%') {
814 state = sw_usual;
815 *u++ = ch;
816 ch = *p++;
817 break;
818 }
807 state = quoted_state; 819 state = quoted_state;
808 break; 820 break;
809 } 821 }
810 822
811 return NGX_HTTP_PARSE_INVALID_REQUEST; 823 return NGX_HTTP_PARSE_INVALID_REQUEST;