Subject: | PoCo::Client::HTTP "eats" requests in some situations |
There is situation in which PoCo::Client::HTTP does not send response to client.
I found if PoCo::Client::HTTP successfully connects to host, send successfuly request and wait for response but response never sent. Then connection times out and no response sent back to client (which send request to PoCo::Client::HTTP).
I wrote a patch which works for me, however I do not understand how to work with Client::Keepalive well. So please review patch thoroughly.
Thank you in advance!
Index: HTTP.pm
===================================================================
--- HTTP.pm (revision 211)
+++ HTTP.pm (working copy)
@@ -296,7 +296,7 @@
_finish_request($heap, $request, 0);
return;
}
- elsif ($request->[REQ_STATE] & RS_POSTED) {
+ else {
DEBUG and warn "I/O: Disconnect, keepalive timeout or HTTP/1.0.";
$request->error(408, "Request timed out") if $request->[REQ_STATE];
return;