nghttpx: Check Content-Length only when Transfer-Encoding is not found
This commit is contained in:
parent
fff785178d
commit
e8053ac931
|
@ -767,6 +767,8 @@ void Downstream::inspect_http1_response() {
|
||||||
chunked_response_ = true;
|
chunked_response_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// examine Content-Length only when Transfer-Encoding is missing
|
||||||
|
if (idx == -1) {
|
||||||
idx = response_hdidx_[http2::HD_CONTENT_LENGTH];
|
idx = response_hdidx_[http2::HD_CONTENT_LENGTH];
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
auto len = util::parse_uint(response_headers_[idx].value);
|
auto len = util::parse_uint(response_headers_[idx].value);
|
||||||
|
@ -774,6 +776,7 @@ void Downstream::inspect_http1_response() {
|
||||||
response_content_length_ = len;
|
response_content_length_ = len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Downstream::reset_response() {
|
void Downstream::reset_response() {
|
||||||
|
|
Loading…
Reference in New Issue