mirror of
https://github.com/nginx/nginx.git
synced 2024-12-18 21:23:36 -06:00
Allowed '-' in method names.
It is used at least by SOAP (M-POST method, defined by RFC 2774) and by WebDAV versioning (VERSION-CONTROL and BASELINE-CONTROL methods, defined by RFC 3253).
This commit is contained in:
parent
f594b2bf6d
commit
82ec849271
@ -149,7 +149,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((ch < 'A' || ch > 'Z') && ch != '_') {
|
||||
if ((ch < 'A' || ch > 'Z') && ch != '_' && ch != '-') {
|
||||
return NGX_HTTP_PARSE_INVALID_METHOD;
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
||||
break;
|
||||
}
|
||||
|
||||
if ((ch < 'A' || ch > 'Z') && ch != '_') {
|
||||
if ((ch < 'A' || ch > 'Z') && ch != '_' && ch != '-') {
|
||||
return NGX_HTTP_PARSE_INVALID_METHOD;
|
||||
}
|
||||
|
||||
|
@ -3178,7 +3178,7 @@ ngx_http_v2_parse_method(ngx_http_request_t *r, ngx_http_v2_header_t *header)
|
||||
p = r->method_name.data;
|
||||
|
||||
do {
|
||||
if ((*p < 'A' || *p > 'Z') && *p != '_') {
|
||||
if ((*p < 'A' || *p > 'Z') && *p != '_' && *p != '-') {
|
||||
ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
|
||||
"client sent invalid method: \"%V\"",
|
||||
&r->method_name);
|
||||
|
Loading…
Reference in New Issue
Block a user