From: Ruslan Ermilov Date: Thu, 24 May 2018 09:06:35 +0000 (+0300) Subject: Allowed digits, '+', '-', and '.' in scheme names as per RFC 3986. X-Git-Tag: release-1.15.1~16 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=c804eb7748d2b7ba2cfa6bbd68d5b86b0ba33d55;p=nginx.git Allowed digits, '+', '-', and '.' in scheme names as per RFC 3986. --- diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 844054c9d..d9a1dbedb 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -307,6 +307,11 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b) break; } + if ((ch >= '0' && ch <= '9') || ch == '+' || ch == '-' || ch == '.') + { + break; + } + switch (ch) { case ':': r->schema_end = p;