]> git.kaiwu.me - nginx.git/commitdiff
allow underscore in request method
authorIgor Sysoev <igor@sysoev.ru>
Mon, 13 Jul 2009 09:33:34 +0000 (09:33 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 13 Jul 2009 09:33:34 +0000 (09:33 +0000)
src/http/ngx_http_parse.c

index 4aa1be8edbe0639187eea9ab6504b73b3df58835..5bb6bb7cff0c5f44325135443ebf7b0126cc88f5 100644 (file)
@@ -143,7 +143,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
                 break;
             }
 
-            if (ch < 'A' || ch > 'Z') {
+            if ((ch < 'A' || ch > 'Z') && ch != '_') {
                 return NGX_HTTP_PARSE_INVALID_METHOD;
             }
 
@@ -257,7 +257,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
                 break;
             }
 
-            if (ch < 'A' || ch > 'Z') {
+            if ((ch < 'A' || ch > 'Z') && ch != '_') {
                 return NGX_HTTP_PARSE_INVALID_METHOD;
             }