# HG changeset patch # User Igor Sysoev # Date 1247477614 0 # Node ID 2c0f09aa85747224308e50bde7587fd36aacfb7b # Parent 63f71723cd2a6ba569000d44b9236131b537d2f7 allow underscore in request method diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c --- 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_req 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_req break; } - if (ch < 'A' || ch > 'Z') { + if ((ch < 'A' || ch > 'Z') && ch != '_') { return NGX_HTTP_PARSE_INVALID_METHOD; }