cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re[2]: SOCKS proxy problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 17 Sep 2006 12:25:04 +0200 (CEST)

On Sun, 17 Sep 2006, Dmitriy Sergeyev wrote:

>> No, it would possibly make it work better than now but it would be far away
>> from a good solution.

> It makes work much better for me. :) The bug is gone away. So, here is my
> patch with such changes. I'm agree that it is no so good solution, but I
> think it is better than nothing. Because the bug is really exists and easily
> reproducible.

Yes, it might be better than the current situation for socks[45] but the
function is a big no-no for everything else in libcurl. I would like a comment
for that function saying so, and also that the function RELIES on the socket
to be set in blocking mode as otherwise it'll busy-loop like crazy until data
arrives.

And in addition to this, the function also needs to take the timeout(s) into
account, as otherwise you'll easily get the function to hang there "eternally"
if your server goes away during negotiation. We already have a fair stream of
people reporting that we don't acknowledge the timeouts during SOCKS
connections so let's not add more trouble to that pile.

I have a suggestion: we move out the SOCKS* code to a new file and we put this
new "handicapped" function in there, so that we can easily allow people who
build without SOCKS to void having to carry that around. Also, it would make
it more obvious that this function is only to be used by the socks code.

I wish there was someone who really cared for the SOCKS situation and could
integrate it properly.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-09-17