cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl http: == Info: Connection #0 to host left intact

From: Ravinder Verma <ravinder.verma_at_gmail.com>
Date: Wed, 20 Sep 2006 20:39:58 -0700

Hi there:

I am posting this question after digging mailing list archives. So
please point me to the right URL in case this question is already
answer.

Recently I downloaded curl 7.15.0, cross compiled for target powerpc
(PPC). Please find below curl binary details.

# ./curl -V
curl 7.15.0 (powerpc-unknown-linux-gnu) libcurl/7.15.0 OpenSSL/0.9.7d zlib/1.1.4
Protocols: tftp ftp gopher telnet dict ldap http file https ftps
Features: Largefile NTLM SSL libz

Running into a strange issue with http where it works for few sites
and graceully exit with following message for others.

== Info: Connection #0 to host 10.100.102.239 left intact
== Info: Closing connection #0

I have compare --ascii-trace output and don't see any anomaly.

Output when it fails:
== Info: About to connect() to 10.100.102.239 port 80
== Info: Trying 10.100.102.239... == Info: connected
== Info: Connected to 10.100.102.239 (10.100.102.239) port 80
=> Send header, 147 bytes (0x93)
0000: GET / HTTP/1.1
0010: User-Agent: curl/7.15.0 (powerpc-unknown-linux-gnu) libcurl/7.15
0050: .0 OpenSSL/0.9.7d zlib/1.1.4
006e: Host: 10.100.102.239
0084: Accept: */*
0091:
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 37 bytes (0x25)
0000: Date: Thu, 21 Sep 2006 00:47:39 GMT
<= Recv header, 32 bytes (0x20)
0000: Server: Apache/2.0.52 (Fedora)
<= Recv header, 46 bytes (0x2e)
0000: Last-Modified: Tue, 15 Aug 2006 22:00:31 GMT
<= Recv header, 30 bytes (0x1e)
0000: ETag: "9385da-1aaa-8a09bdc0"
<= Recv header, 22 bytes (0x16)
0000: Accept-Ranges: bytes
<= Recv header, 22 bytes (0x16)
0000: Content-Length: 6826
<= Recv header, 45 bytes (0x2d)
0000: Content-Type: text/html; charset=ISO-8859-1
== Info: Connection #0 to host 10.100.102.239 left intact
== Info: Closing connection #0

Output when it works:
== Info: About to connect() to 66.102.7.147 port 80
== Info: Trying 66.102.7.147... == Info: connected
== Info: Connected to 66.102.7.147 (66.102.7.147) port 80
=> Send header, 145 bytes (0x91)
0000: GET / HTTP/1.1
0010: User-Agent: curl/7.15.0 (powerpc-unknown-linux-gnu) libcurl/7.15
0050: .0 OpenSSL/0.9.7d zlib/1.1.4
006e: Host: 66.102.7.147
0082: Accept: */*
008f:
<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 24 bytes (0x18)
0000: Cache-Control: private
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 152 bytes (0x98)
0000: Set-Cookie: PREF=ID=5379a8cb4e543a65:TM=1158799903:LM=1158799903
0040: :S=RZeo6ZOcIqgbNEsp; expires=Sun, 17-Jan-2038 19:14:07 GMT; path
0080: =/; domain=.google.com
<= Recv header, 17 bytes (0x11)
0000: Server: GWS/2.1
<= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
<= Recv header, 37 bytes (0x25)
0000: Date: Thu, 21 Sep 2006 00:51:43 GMT
<= Recv data, 1078 bytes (0x436)

With strace only difference I see when it fails after recv call write
does not happen.
Failure traces:
recv(4, "HTTP/1.1 200 OK\r\nDate: Thu, 21 S"..., 16384, 0) = 7079
gettimeofday({1158715699, 703764}, NULL) = 0
gettimeofday({1158715699, 705303}, NULL) = 0
gettimeofday({1158715699, 706199}, NULL) = 0
gettimeofday({1158715699, 706846}, NULL) = 0
gettimeofday({1158715699, 707499}, NULL) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0
gettimeofday({1158715699, 709879}, NULL) = 0
time([1158715699]) = 1158715699
close(4) = 0
gettimeofday({1158715699, 713560}, NULL) = 0
exit(0)

On Success:
recv(4, "HTTP/1.1 200 OK\r\nCache-Control: "..., 16384, 0) = 2926
gettimeofday({1158715726, 609883}, NULL) = 0
write(1, "<html><head><meta......
............

Thanks,
Ravinder
Received on 2006-09-21