cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users list Archives

Re: I want to tackle "Known Bug #12", where to start?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 27 Jul 2013 23:47:25 +0200 (CEST)

On Fri, 26 Jul 2013, darkaspitch darkaspitch wrote:

> According to this webpage: http://curl.haxx.se/docs/knownbugs.html
>
> Known Bug #12 is: When connecting to a SOCKS proxy, the (connect) timeout is
> not properly acknowledged after the actual TCP connect (during the SOCKS
> "negotiate" phase).
>
> If somebody could kindly point me in the right direction of where to begin
> looking to fix this bug in the github I would greatly appreciate it:
> https://github.com/bagder/curl

Hi!

I'm glad you ask, and here it goes...

0 - werlcome to our merry corner of the world! I hope you'll find us an easy
going and friendly bunch of people. I think we generally are!

1 - read this: http://curl.haxx.se/dev/contribute.html

2 - You'll learn that curl-library is the list to use for further library-
related development talks (I've cc'ed this reply there)

3 - That known bug was added back in 2004 and was first mentioned in the curl
7.12.2 release. It may not be entirely correct these days so your first job
would be to determine the current situation and how the problem manifests
itself today.

I did a quick check and it seems to be at least partly still present, as there
are some passages of SOCKS-code that doesn't seem to timeout properly if the
connect-time is met during the handshake. And I also fear that there are some
busy-waits somewhere if libcurl sends off partial data until the entire thing
has been sent.

4 - You'll soon realize that a big problem to test any fixes in this area is
the fact that we don't have a decent socks-proxy for the test suite. The SOCKS
tests we do, we do using openssh's SOCKS-feature but that's only good for
basic positive tests and not for testing actual low-level socks stuff like
non-compliant servers, very slow servers etc. A much better approach would be
to provide a stand-alone test proxy for the test suite that would can control
from the test script to behave in certain ways and then make sure (lib)curl
deals with that properly. Like for this known_bug: a very slow server and a
short enough connect timeout used in libcurl.

5 - All SOCKS-code that's relevant in the primary look are in the lib/socks*.c
source files.

6 - for some additional descriptions of libcurl internals that may be good to
check out, read http://curl.haxx.se/dev/internals.html

7 - If there's anything I've left out, or if there's anything still not clear
or whatever, we're 1000+ subscribers present on curl-library and a large bunch
of these are skilled people and many have experience of modifying and
improving libcurl. Send your questions there!

8 - Oh, and do read our mailing list etiquette guidelines before you continue:
http://curl.haxx.se/mail/etiquette.html so that we don't have to get annoyed
first thing. I'm sorry to say, but your name+email doesn't make you look like
a serious contributor.

Good luck!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-27

These mail archives are generated by hypermail.

donate! Page updated May 06, 2013.
web site info

File upload with ASP.NET