cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2913886 ] proxy and ftp - never issues request

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sun, 13 Dec 2009 22:40:18 +0000

Bugs item #2913886, was opened at 2009-12-13 16:07
Message generated for change (Comment added) made by jnelson
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2913886&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jon Nelson (jnelson)
Assigned to: Daniel Stenberg (bagder)
Summary: proxy and ftp - never issues request

Initial Comment:
curl 7.19.6 on openSUSE 11.2, connecting via ftp through a squid proxy.

I noticed a problem attempting to fetch from an ftp resources that curl appeared to connect and then do nothing until it eventually timed out.
Suspecting some other problem, I tried aria2, wget, and firefox -- all of which worked just fine.

So I strace'd curl and this is what I get (the proxy is 192.168.1.1 port 3128):
...

10137 16:03:52.937144 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3 <0.000020>
10137 16:03:52.937229 setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000015>
10137 16:03:52.937290 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) <0.000012>
10137 16:03:52.937340 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000011>
10137 16:03:52.937394 connect(3, {sa_family=AF_INET, sin_port=htons(3128), sin_addr=inet_addr("192.168.1.1")}, 16) = -1 EINPROGRESS (Operation now in progress) <0.000057>
10137 16:03:52.937516 poll([{fd=3, events=POLLOUT}], 1, 299999) = 1 ([{fd=3, revents=POLLOUT}]) <0.000879>
10137 16:03:52.938452 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 <0.000012>
10137 16:03:52.938516 poll([{fd=3, events=POLLIN|POLLPRI}], 1, 3600000) = 1 ([{fd=3, revents=POLLIN}]) <29.348688>
10137 16:04:22.287387 recvfrom(3, "", 16384, 0, NULL, NULL) = 0 <0.000028>
10137 16:04:22.287525 close(3) = 0 <0.000079>

followed by curl grumping (error 56).

What I don't understand is why, after the connect is successful, curl doesn't send the proxy anything.

----------------------------------------------------------------------

>Comment By: Jon Nelson (jnelson)
Date: 2009-12-13 16:40

Message:
The recvfrom:
10137 16:04:22.287387 recvfrom(3, "", 16384, 0, NULL, NULL) = 0 <0.000028>

is receiving from file descriptor no 3. fd 3 was created here:

10137 16:03:52.937144 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
<0.000020>

(clearly a TCP socket) and the subsequent statements clearly show it to be
the socket which curl is using to communicate with the proxy:

10137 16:03:52.937394 connect(3, {sa_family=AF_INET,
sin_port=htons(3128),
sin_addr=inet_addr("192.168.1.1")}, 16) = -1 EINPROGRESS (Operation now
in
progress) <0.000057>

--trace-ascii and --trace-time added:

18:21:57.436169 == Info: About to connect() to proxy 192.168.1.1 port 3128
(#0)
18:21:57.437620 == Info: Trying 192.168.1.1... 18:21:57.439207 == Info:
connected
18:21:57.439770 == Info: Connected to 192.168.1.1 (192.168.1.1) port 3128
(#0)

18:22:26.845603 == Info: FTP response reading failed
18:22:26.845939 == Info: Closing connection #0
curl: (56) FTP response reading failed

The strace is pretty clear to me that curl (or libcurl) is simply waiting
for a response that will never come. The response will never come because
it never asks for anything!

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-12-13 16:31

Message:
recvfrom() ?? Is that from the DNS resolve? It doesnät make sense to me.

Can you run curl with --trace-ascii and get a dump of that to show us?

We run ftp over http proxy in our test suite (in several test cases even),
which runs fine on every release before we ship it and it still runs fine
in our current dev version.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2913886&group_id=976
Received on 2009-12-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET