]> git.kaiwu.me - nginx.git/commitdiff
merge r2976:
authorIgor Sysoev <igor@sysoev.ru>
Mon, 26 Oct 2009 17:37:18 +0000 (17:37 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 26 Oct 2009 17:37:18 +0000 (17:37 +0000)
allow underscore in request method

src/http/ngx_http_parse.c

index 160f96dbe75cdffa76ad334f92cc0d3cb75289ac..d2abaa708765b75b597ad0f66118f6907fa80004 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;
             }