httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55475] mod_proxy breaks HTTP chunked transfer coding
Date Wed, 18 Sep 2013 20:27:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55475

--- Comment #24 from Yann Ylavic <ylavic.dev@gmail.com> ---
Yes, sorry, all this is a bit confusing, let me summarize.

The attachment 30858 alone is enough to solve the current issue, since it will
:
1. return APR_ECONNABORTED (instead of APR_EOF) when the body is not complete
so that mod_proxy_http handles an error (APR_EOF can't be handled as an error
in mod_proxy_http because it can be a legitimate end of a closed/streamed
response),
2. retry the ap_get_brigade(AP_MODE_GETLINE, APR_BLOCK_READ) when reading the
chunks even if it gets an empty brigade,
3. catch GATEWAY_TIMED_OUT like BAD_GATEWAY in ap_http_outerror_filter and
ap_http_chunk_filter to handle the error bucket from mod_proxy_http.

For 1. I first used APR_INCOMPLETE instead of APR_ECONNABORTED, but because of
the weird associated error string ("Partial results are valid but processing is
incomplete"), I changed to the latter. I'm not sure it is a good idea since
APR_ECONNABORTED can be returned from the socket, and now there will be no way
to distinguish...

The 2. is needed because ap_core_input_filter returns SUCCESS with an empty
brigade in getline+blocking modes when the connection is closed (immediatly).
As this seems odd to me, I proposed attachment 30857 to fix the problem at the
base so other filters than ap_http_filter don't have to handle this case.

Finally 3. is an issue which must be resolved to address this bug but surely
others (and the debate in dev@ is not really closed...), hence I proposed the
separate attachment 30849, and finally put it in 3. (forgot about it), let me
know if you want me to pull it out of attachment 30858, depending on how you'd
likely commit all that (as a whole or separately).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message