comparison src/http/v2/ngx_http_v2.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 72282dd5884e
children 5e95b9fb33b7
comparison
equal deleted inserted replaced
6731:3f94a0fc05cf 6732:57148b755320
3176 } while (--n); 3176 } while (--n);
3177 3177
3178 p = r->method_name.data; 3178 p = r->method_name.data;
3179 3179
3180 do { 3180 do {
3181 if ((*p < 'A' || *p > 'Z') && *p != '_') { 3181 if ((*p < 'A' || *p > 'Z') && *p != '_' && *p != '-') {
3182 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, 3182 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
3183 "client sent invalid method: \"%V\"", 3183 "client sent invalid method: \"%V\"",
3184 &r->method_name); 3184 &r->method_name);
3185 3185
3186 return NGX_DECLINED; 3186 return NGX_DECLINED;