aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_parse.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2016-10-10 16:24:50 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2016-10-10 16:24:50 +0300
commit82ec8492717dcf141eead17fd158ff3f9e072e84 (patch)
tree7011465fcb1d1656e71de92c42dfd996eb8e1986 /src/http/ngx_http_parse.c
parentf594b2bf6dbb49f5e2bc27cc3f27f272a7f95c1c (diff)
downloadnginx-82ec8492717dcf141eead17fd158ff3f9e072e84.tar.gz
nginx-82ec8492717dcf141eead17fd158ff3f9e072e84.zip
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).
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r--src/http/ngx_http_parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index bd6c9c9b5..9f9947316 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -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;
}