]> git.kaiwu.me - nginx.git/commitdiff
nginx-0.0.1-2003-12-02-19:57:05 import
authorIgor Sysoev <igor@sysoev.ru>
Tue, 2 Dec 2003 16:57:05 +0000 (16:57 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 2 Dec 2003 16:57:05 +0000 (16:57 +0000)
src/http/ngx_http_parse.c

index dd97433ed7e1d9a67a77b92241ad86d2d65421e2..5dc0bc3bdb54b1c3344cb718c137628b0a64ab58 100644 (file)
@@ -797,6 +797,12 @@ ngx_log_debug(r->connection->log, "S: %d UN: '%x:%c', URI: '%c'" _
         case sw_quoted_second:
             if (ch >= '0' && ch <= '9') {
                 ch = (decoded << 4) + ch - '0';
+                if (ch == '%') {
+                    state = sw_usual;
+                    *u++ = ch;
+                    ch = *p++;
+                    break;
+                }
                 state = quoted_state;
                 break;
             }
@@ -804,6 +810,12 @@ ngx_log_debug(r->connection->log, "S: %d UN: '%x:%c', URI: '%c'" _
             c = ch | 0x20;
             if (c >= 'a' && c <= 'f') {
                 ch = (decoded << 4) + c - 'a' + 10;
+                if (ch == '%') {
+                    state = sw_usual;
+                    *u++ = ch;
+                    ch = *p++;
+                    break;
+                }
                 state = quoted_state;
                 break;
             }