Mercurial > hg > nginx
comparison src/http/ngx_http_parse.c @ 8407:d6feece1288a quic
Fixed $request_length for HTTP/3.
New field r->parse_start is introduced to substitute r->request_start and
r->header_name_start for request length accounting. These fields only work for
this purpose in HTTP/1 because HTTP/1 request line and header line start with
these values.
Also, error logging is now fixed to output the right part of the request.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 19 May 2020 15:47:37 +0300 |
parents | e5d4f057a6cb |
children | e334ca1b23ba |
comparison
equal
deleted
inserted
replaced
8406:66feab03d9b7 | 8407:d6feece1288a |
---|---|
141 | 141 |
142 switch (state) { | 142 switch (state) { |
143 | 143 |
144 /* HTTP methods: GET, HEAD, POST */ | 144 /* HTTP methods: GET, HEAD, POST */ |
145 case sw_start: | 145 case sw_start: |
146 r->parse_start = p; | |
146 r->request_start = p; | 147 r->request_start = p; |
147 r->method_start = p; | 148 r->method_start = p; |
148 | 149 |
149 if (ch == CR || ch == LF) { | 150 if (ch == CR || ch == LF) { |
150 break; | 151 break; |
881 | 882 |
882 switch (state) { | 883 switch (state) { |
883 | 884 |
884 /* first char */ | 885 /* first char */ |
885 case sw_start: | 886 case sw_start: |
887 r->parse_start = p; | |
886 r->header_name_start = p; | 888 r->header_name_start = p; |
887 r->invalid_header = 0; | 889 r->invalid_header = 0; |
888 | 890 |
889 switch (ch) { | 891 switch (ch) { |
890 case CR: | 892 case CR: |