Mercurial > hg > nginx-quic
comparison src/http/ngx_http_parse.c @ 6732:57148b755320
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).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Oct 2016 16:24:50 +0300 |
parents | b3682580c1bd |
children | 8801ff7d58e1 d409ab1e8e4d |
comparison
equal
deleted
inserted
replaced
6731:3f94a0fc05cf | 6732:57148b755320 |
---|---|
147 | 147 |
148 if (ch == CR || ch == LF) { | 148 if (ch == CR || ch == LF) { |
149 break; | 149 break; |
150 } | 150 } |
151 | 151 |
152 if ((ch < 'A' || ch > 'Z') && ch != '_') { | 152 if ((ch < 'A' || ch > 'Z') && ch != '_' && ch != '-') { |
153 return NGX_HTTP_PARSE_INVALID_METHOD; | 153 return NGX_HTTP_PARSE_INVALID_METHOD; |
154 } | 154 } |
155 | 155 |
156 state = sw_method; | 156 state = sw_method; |
157 break; | 157 break; |
268 | 268 |
269 state = sw_spaces_before_uri; | 269 state = sw_spaces_before_uri; |
270 break; | 270 break; |
271 } | 271 } |
272 | 272 |
273 if ((ch < 'A' || ch > 'Z') && ch != '_') { | 273 if ((ch < 'A' || ch > 'Z') && ch != '_' && ch != '-') { |
274 return NGX_HTTP_PARSE_INVALID_METHOD; | 274 return NGX_HTTP_PARSE_INVALID_METHOD; |
275 } | 275 } |
276 | 276 |
277 break; | 277 break; |
278 | 278 |