You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2020/06/16 08:58:27 UTC

[Bug 61090] mod_proxy gives 502 on early HTTP response (3xx, 4xx, 5xx)

https://bz.apache.org/bugzilla/show_bug.cgi?id=61090

--- Comment #21 from Michael Osipov <mi...@apache.org> ---
Yann, I think I know how this can be solved (logically). I have talked to curl,
Tomcat and HttpComponents fellow committers.

* curl: It uses non-blocking I/O to detect early responses and fills a struct
with that information. See https://curl.haxx.se/mail/archive-2020-05/0054.html
* Tomcat behaves correctly, Mark has also added another improvement to send out
"Connection: close" on an early response because the connection is closed. See
https://github.com/apache/tomcat/commit/3c304cc0da9dd413ac4df289299e9ff04c670b17.
* HttpComponents: We have been tried back and forth with Oleg for the blocking
client since I assume that mod_proxy_http uses blocking I/O too, and we have
come up with a decent solution. Discussion:
https://www.mail-archive.com/httpclient-users@hc.apache.org/msg09911.html,
patch:
https://github.com/apache/httpcomponents-core/commit/6637591213221b21a5a473e7092fa2e65d69715c

What we basically do is after headers are sent and after every 8 KiB chunk of
request body data we probe whether data is available from the server. If yes,
we mark the request as aborted/inconsistent, stop sending and close the
connection. The discussion also contains extensive logging output.

I have no idea how to implement this in mod_proxy_http. What do you think, is
this feasible with the the proxy module and APR?

-- 
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