aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_parse.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2020-11-25 17:57:43 +0000
committerRoman Arutyunyan <arut@nginx.com>2020-11-25 17:57:43 +0000
commit7cfc5eb11fbfe3beb9d793dbacae70fb658d46c2 (patch)
treeb63a794cf1330bb69c0c137c0387265792fea785 /src/http/ngx_http_parse.c
parent9129fb3db9e2f9899161e9573e7a19c774a0df6a (diff)
downloadnginx-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_parse.c')
-rw-r--r--src/http/ngx_http_parse.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index 2015f56b2..f8ec03c50 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -145,7 +145,6 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
case sw_start:
r->parse_start = p;
r->request_start = p;
- r->method_start = p;
if (ch == CR || ch == LF) {
break;
@@ -160,7 +159,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
case sw_method:
if (ch == ' ') {
- r->method_end = p;
+ r->method_end = p - 1;
m = r->request_start;
switch (p - m) {
@@ -833,10 +832,6 @@ done:
r->request_end = p;
}
- if (r->http_protocol.data) {
- r->http_protocol.len = r->request_end - r->http_protocol.data;
- }
-
r->http_version = r->http_major * 1000 + r->http_minor;
r->state = sw_start;