Re: [Polipo-users] Proxy Auth Problem.

2008-07-08 Thread Juliusz Chroboczek
>> It's obviously not correct in general. Consider the following: >> >> FUBAR foo HTTP/1.1 >> >> foo > If we worry about people/client send us malformed request intentionally, No, I'm worrying about doing the right thing. It's not always obvious what the right thing is, especially when speakin

Re: [Polipo-users] Proxy Auth Problem.

2008-06-19 Thread Ming Fu
> > > Change the default len to 0 make the case of no Content-Length the same > as > > "Content-Length:0". > > It's obviously not correct in general. Consider the following: > > FUBAR foo HTTP/1.1 > > foo > > There's no content-length, so Polipo will run discardBody with len=-1, > which will kee

Re: [Polipo-users] Proxy Auth Problem.

2008-06-18 Thread Juliusz Chroboczek
> This seems to work, but very hard to understand the logic. [...] > Change the default len to 0 make the case of no Content-Length the same as > "Content-Length:0". It's obviously not correct in general. Consider the following: FUBAR foo HTTP/1.1 foo There's no content-length, so Polipo

Re: [Polipo-users] Proxy Auth Problem.

2008-06-12 Thread Ming Fu
Hi Juliusz, This seems to work, but very hard to understand the logic. How about this change fed:polipo-1.0.4 1009$ diff -c http_parse.c http_parse1.c *** http_parse.c2008-01-08 07:56:45.0 -0500 --- http_parse1.c 2008-06-12 09:53:46.0 -0400 *** *** 750,7

Re: [Polipo-users] Proxy Auth Problem.

2008-06-11 Thread Juliusz Chroboczek
Could you please let me know if this patch fixes the issue? Juliusz --- old-polipo/client.c 2008-06-11 19:34:22.0 +0200 +++ new-polipo/client.c 2008-06-11 19:34:22.0 +0200 @@ -975,10 +975,24 @@ if(connection->reqte != TE_IDENTITY)

Re: [Polipo-users] Proxy Auth Problem.

2008-06-11 Thread Juliusz Chroboczek
> The httpParseHeaders() function return bodylen -1 if the http headers do not > content a Content-Length header. Yes. I've taken a short-cut in the no-Content-Length case, which is not quite correct. Since POST and PUT require the Content-Length, I've been assuming that a client with no content

Re: [Polipo-users] Proxy Auth Problem.

2008-06-11 Thread Ming Fu
Hi, Here is an example to illustrate the problem. Some secure site, bank, government, etc use java through port 443. The JVM in the browser doesn't seem to see the proxy auth already established by the browser to the polipo. The first thing these java code send to the server is a CONNECT request

[Polipo-users] Proxy Auth Problem.

2008-06-09 Thread Ming Fu
Hi, The httpParseHeaders() function return bodylen -1 if the http headers do not content a Content-Length header. When the following combination happens, polipo prematurely shutdown client socket before a 407 reply can be sent. 1. Proxy Authentication required by Polipo 2. Client Make a CONNECT