Jared Ingersoll | 1 Aug 2003 14:19

RE: speeding up curl

I don't think it's network related. I've done a trace as suggested, and it
looks like the hang-up is around the authentication header. 

Here's the post:

LD_LIBRARY_PATH=/usr/local/ssl/lib:/usr/local/lib
export LD_LIBRARY_PATH

/usr/local/bin/curl --trace tracefile.txt -d  <at> data.txt -H  "Host:
www.xyz.com" -H "Authorization: Basic (authstring)" -H "Accept: */*" -H
"Content-Type: text/plain" -H "Content-Length: 453"
https://www.xyz.com/csw/servlet/xmlrequest

Here's the trace dump:

> more tracefile.txt
== Info: About to connect() to www.xyz.com:443
== Info: Connected to www.xyz.com: (x.x.x.x) port 443
== Info: SSL connection using RC4-MD5
== Info: Server certificate:
== Info:         subject: /C=US/ST=Massachusetts/L=Cambridge/O=Case Shiller
Weiss/CN=www.xyz.com
== Info:         start date: 2002-08-30 00:00:00 GMT
== Info:         expire date: 2003-09-06 23:59:59 GMT
== Info:         common name: www.xyz.com (matched)
== Info:         issuer: /C=US/O=RSA Data Security, Inc./OU=Secure Server
Certification Authority
=> Send header, 716 bytes (0x2cc)
0000: 50 4f 53 54 20 2f 63 73 77 2f 73 65 72 76 6c 65 POST /csw/servle
0010: 74 2f 78 6d 6c 72 65 71 75 65 73 74 20 48 54 54 t/xmlrequest HTT
(Continue reading)

Daniel Stenberg | 1 Aug 2003 15:14
Picon
Favicon
Gravatar

RE: speeding up curl

On Fri, 1 Aug 2003, Jared Ingersoll wrote:

> I don't think it's network related. I've done a trace as suggested, and it
> looks like the hang-up is around the authentication header.

I disagree. I think it looks as if the server is delaying its reponse.

> /usr/local/bin/curl --trace tracefile.txt -d  <at> data.txt -H  "Host:
> www.xyz.com" -H "Authorization: Basic (authstring)" -H "Accept: */*" -H
> "Content-Type: text/plain" -H "Content-Length: 453"
> https://www.xyz.com/csw/servlet/xmlrequest

Three comments on this command line.

Why do you modify the Content-Length header? That just makes it more
error-prone in case you set it to a size that doesn't match the actual
contents you send. This may very well be the reason why you see this delay.

The Authorization: header is much easily set with the --user option, imho.

The Host: header is not doing anything useful in this case, as curl will add
such a Host: header by itself.

> Here's the trace dump:

[Full POST request cut off]

> Here's where the process hangs for 25 seconds, then the rest of the data is
> transfered in less than 2 seconds:

(Continue reading)


Gmane