aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2018-05-24 12:06:35 +0300
committerRuslan Ermilov <ru@nginx.com>2018-05-24 12:06:35 +0300
commitc804eb7748d2b7ba2cfa6bbd68d5b86b0ba33d55 (patch)
tree33fc16452493080209fa0c711d3eb3a0a7b30a50
parent1ef7b1ef61cbf1e7b014bbaf1c5eb80fef448f79 (diff)
downloadnginx-c804eb7748d2b7ba2cfa6bbd68d5b86b0ba33d55.tar.gz
nginx-c804eb7748d2b7ba2cfa6bbd68d5b86b0ba33d55.zip
Allowed digits, '+', '-', and '.' in scheme names as per RFC 3986.
-rw-r--r--src/http/ngx_http_parse.c5
1 files changed, 5 insertions, 0 deletions
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;