cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLE_GOT_NOTHING on slow connections

From: Richard Bramante <rbramante_at_hotmail.com>
Date: Fri, 27 Feb 2004 10:04:36 -0500

There have been two cases I've been able to capture, one I expected, the
other surprised me a little. The first was, as you say, a case where the
TCP three-way handshake completed, curl connected and sent its HTTP request
and then the connection was closed (FIN) from the server side with
absolutley no reply.

The second, which surpised me, is the case where the connection was never
established. In this case, the server side RST on the initial and
subsequent SYN, but curl.exe still returns 52. This is were I would've
expected 7.

Here is the tcpdump:

09:33:39.310262 IP rbramante.4453 > 1.1.1.1.8080: S 39926772:39926772(0) win
655
35 <mss 1460,nop,nop,sackOK> (DF)
0x0000 4500 0030 1dc3 4000 8006 dcc4 ac10 522e E..0..@.......R.
0x0010 0101 0101 1165 1f90 0261 3bf4 0000 0000 .....e...a;.....
0x0020 7002 ffff 1395 0000 0204 05b4 0101 0402 p...............
09:33:39.310795 IP 1.1.1.1.8080 > rbramante.4453: R 0:0(0) ack 39926773 win
0
0x0000 4500 0028 7e3d 0000 1e06 1e53 0101 0101 E..(~=.....S....
0x0010 ac10 522e 1f90 1165 0000 0000 0261 3bf5 ..R....e.....a;.
0x0020 5014 0000 4045 0000 0000 0000 0000 P..._at_E........
09:33:39.839266 IP rbramante.4453 > 1.1.1.1.8080: S 39926772:39926772(0) win
655
35 <mss 1460,nop,nop,sackOK> (DF)
0x0000 4500 0030 1dc4 4000 8006 dcc3 ac10 522e E..0..@.......R.
0x0010 0101 0101 1165 1f90 0261 3bf4 0000 0000 .....e...a;.....
0x0020 7002 ffff 1395 0000 0204 05b4 0101 0402 p...............
09:33:39.839843 IP 1.1.1.1.8080 > rbramante.4453: R 0:0(0) ack 1 win 0
0x0000 4500 0028 7e3e 0000 1e06 1e52 0101 0101 E..(~>.....R....
0x0010 ac10 522e 1f90 1165 0000 0000 0261 3bf5 ..R....e.....a;.
0x0020 5014 0000 4045 0000 0000 0000 0000 P..._at_E........
09:33:40.386119 IP rbramante.4453 > 1.1.1.1.8080: S 39926772:39926772(0) win
655
35 <mss 1460,nop,nop,sackOK> (DF)
0x0000 4500 0030 1dc6 4000 8006 dcc1 ac10 522e E..0..@.......R.
0x0010 0101 0101 1165 1f90 0261 3bf4 0000 0000 .....e...a;.....
0x0020 7002 ffff 1395 0000 0204 05b4 0101 0402 p...............
09:33:40.386631 IP 1.1.1.1.8080 > rbramante.4453: R 0:0(0) ack 1 win 0
0x0000 4500 0028 7e42 0000 1e06 1e4e 0101 0101 E..(~B.....N....
0x0010 ac10 522e 1f90 1165 0000 0000 0261 3bf5 ..R....e.....a;.
0x0020 5014 0000 4045 0000 0000 0000 0000 P..._at_E........

and here is the curl --trace:

== Info: About to connect() to 1.1.1.1 port 8080
== Info: Connected to 1.1.1.1 (1.1.1.1) port 8080
=> Send header, 184 bytes (0xb8)
0000: 47 45 54 20 2f 66 6f 6f 20 48 54 54 50 2f 31 2e GET /foo HTTP/1.
0010: 31 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 63 1..User-Agent: c
0020: 75 72 6c 2f 37 2e 31 31 2e 30 20 28 77 69 6e 33 url/7.11.0 (win3
0030: 32 29 20 6c 69 62 63 75 72 6c 2f 37 2e 31 31 2e 2) libcurl/7.11.
0040: 30 20 7a 6c 69 62 2f 31 2e 31 2e 34 0d 0a 48 6f 0 zlib/1.1.4..Ho
0050: 73 74 3a 20 31 2e 31 2e 31 2e 31 3a 38 30 38 30 st: 1.1.1.1:8080
0060: 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 ..Pragma: no-cac
0070: 68 65 0d 0a 41 63 63 65 70 74 3a 20 69 6d 61 67 he..Accept: imag
0080: 65 2f 67 69 66 2c 20 69 6d 61 67 65 2f 78 2d 78 e/gif, image/x-x
0090: 62 69 74 6d 61 70 2c 20 69 6d 61 67 65 2f 6a 70 bitmap, image/jp
00a0: 65 67 2c 20 69 6d 61 67 65 2f 70 6a 70 65 67 2c eg, image/pjpeg,
00b0: 20 2a 2f 2a 0d 0a 0d 0a */*....
== Info: Empty reply from server
== Info: Connection #0 left intact

I suppose this is a nit, as curl_easy_perform did return a failure in either
case, but it seems like the 52 return on the second condition could result
in a bit of initial head scratching. It did for me at least.

>From: Daniel Stenberg <daniel-curl_at_haxx.se>
>Reply-To: libcurl development <curl-library_at_cool.haxx.se>
>To: libcurl development <curl-library_at_cool.haxx.se>
>Subject: Re: CURLE_GOT_NOTHING on slow connections
>Date: Thu, 26 Feb 2004 23:49:14 +0100 (CET)

>It is hardly impossible to guess without any network traces. Clearly at
>least
>libcurl thought it was a legitimate connect, but then it got closed before
>any
>response was read from it. But I can't see why a high latency connection
>would
>cause that effect.

_________________________________________________________________
Store more e-mails with MSN Hotmail Extra Storage – 4 plans to choose from!
http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/
Received on 2004-02-27