Could you please let me know if this patch fixes the issue?
Juliusz
--- old-polipo/client.c 2008-06-11 19:34:22.000000000 +0200
+++ new-polipo/client.c 2008-06-11 19:34:22.000000000 +0200
@@ -975,10 +975,24 @@
if(connection->reqte != TE_IDENTITY)
goto fail;
- if(connection->bodylen < 0)
- goto fail;
-
- if(connection->bodylen + connection->reqbegin < connection->reqlen) {
+ if(connection->bodylen < 0) {
+ /* We don't know the body length, either because the request
+ was unparseable, or because it was something that doesn't
+ carry a Content-Length (e.g. CONNECT). We want to do the
+ right thing in the latter case, but don't care much about
+ the former. So we simply shut the connection down as soon
+ as we see any data coming after the headers. */
+ /* reqlen = -2 is used by DiscardHandler to signal that we
+ should shut down. */
+ if(connection->bodylen == -2)
+ goto fail;
+ if(connection->reqlen > connection->reqbegin)
+ goto fail;
+ connection->reqbegin = 0;
+ connection->reqlen = 0;
+ httpConnectionDestroyReqbuf(connection);
+ /* httpClientDiscardHander will call us back. */
+ } else if(connection->bodylen + connection->reqbegin < connection->reqlen)
{
connection->reqbegin += connection->bodylen;
connection->bodylen = 0;
} else {
@@ -1074,7 +1088,7 @@
if(status) {
if(status < 0 && status != -EPIPE)
do_log_error(L_ERROR, -status, "Couldn't read from client");
- connection->bodylen = -1;
+ connection->bodylen = -2;
return httpClientDiscardBody(connection);
}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users