From: Igor Sysoev Date: Mon, 13 Jul 2009 09:33:34 +0000 (+0000) Subject: allow underscore in request method X-Git-Tag: release-0.8.5~1 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=df4b230ede64a7e576e2cb2ccb4e817774ccfe49;p=nginx.git allow underscore in request method --- diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 4aa1be8ed..5bb6bb7cf 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -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; }