diff options
author | Roman Arutyunyan <arut@nginx.com> | 2020-11-25 17:57:43 +0000 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2020-11-25 17:57:43 +0000 |
commit | 7cfc5eb11fbfe3beb9d793dbacae70fb658d46c2 (patch) | |
tree | b63a794cf1330bb69c0c137c0387265792fea785 /src/http/ngx_http_request.c | |
parent | 9129fb3db9e2f9899161e9573e7a19c774a0df6a (diff) | |
download | nginx-7cfc5eb11fbfe3beb9d793dbacae70fb658d46c2.tar.gz nginx-7cfc5eb11fbfe3beb9d793dbacae70fb658d46c2.zip |
HTTP/3: eliminated r->method_start.
The field was introduced to ease parsing HTTP/3 requests.
The change reduces diff to the default branch.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 3b9e59005..a60c5758f 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1162,8 +1162,12 @@ ngx_http_process_request_line(ngx_event_t *rev) ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "http request line: \"%V\"", &r->request_line); - r->method_name.len = r->method_end - r->method_start; - r->method_name.data = r->method_start; + r->method_name.len = r->method_end - r->request_start + 1; + r->method_name.data = r->request_line.data; + + if (r->http_protocol.data) { + r->http_protocol.len = r->request_end - r->http_protocol.data; + } if (ngx_http_process_request_uri(r) != NGX_OK) { break; |