[nginx] Allowed digits, '+', '-', and '.' in scheme names as per RFC 3986.

Ruslan Ermilov ru at nginx.com
Thu Jun 7 19:01:16 UTC 2018


details:   http://hg.nginx.org/nginx/rev/f9661f56c717
branches:  
changeset: 7292:f9661f56c717
user:      Ruslan Ermilov <ru at nginx.com>
date:      Thu May 24 12:06:35 2018 +0300
description:
Allowed digits, '+', '-', and '.' in scheme names as per RFC 3986.

diffstat:

 src/http/ngx_http_parse.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 3482c069e050 -r f9661f56c717 src/http/ngx_http_parse.c
--- a/src/http/ngx_http_parse.c	Wed Jun 06 13:31:05 2018 +0300
+++ b/src/http/ngx_http_parse.c	Thu May 24 12:06:35 2018 +0300
@@ -307,6 +307,11 @@ ngx_http_parse_request_line(ngx_http_req
                 break;
             }
 
+            if ((ch >= '0' && ch <= '9') || ch == '+' || ch == '-' || ch == '.')
+            {
+                break;
+            }
+
             switch (ch) {
             case ':':
                 r->schema_end = p;


More information about the nginx-devel mailing list