diff src/http/ngx_http_request.c @ 7295:89430899c72a

Added r->schema. For HTTP/1, it keeps scheme from the absolute form of URI. For HTTP/2, the :scheme request pseudo-header field value.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 07 Jun 2018 20:01:41 +0300
parents 21ad2af3262c
children e45f09198dab
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -987,6 +987,11 @@ ngx_http_process_request_line(ngx_event_
                 return;
             }
 
+            if (r->schema_end) {
+                r->schema.len = r->schema_end - r->schema_start;
+                r->schema.data = r->schema_start;
+            }
+
             if (r->host_end) {
 
                 host.len = r->host_end - r->host_start;