curl-users
Re: CURL and content-length and connection-close
Date: Wed, 29 Oct 2003 09:38:04 +0100
Hello!
See answers below ...
>>I have a problem connection CURL to a special Server. This server sends the
>>answer completely, but don't closes the connection. The Server send a
>>"Content-length: 145" or so and after this he sends the 145 bytes of data.
>
> That is standard and normal behavior by HTTP 1.1 servers. It isn't special at
> all.
Yes, but that server answeres with "200 OK HTTP/1.0" ... it is a server
of Mastercard and they can't change anything there ... I don't know what
they have done with that server ...
>>After this the answer is completely received, but the server don't sends any
>>additional data. The Server needs around 30 more seconds to close the
>>connection and curl will wait these 30 Seconds.
>
> If curl does that, it is a bug. In curl or in the server end.
Hm ... from Mastercard I got this answer:
> The Server is configured to establish and maintain persistent connections (if
> allowed) and as a result your Client may be waiting some given duration (
> approx. 30 secs) for the Server to close the connection once the Message has been
> sent. I suspect that once this time has elapsed, your Client is actually
> closing this connection.
But we found out that the server closes connection after 30 seconds and
not the client, the client still waits for more data.
>>Is there a way to force CURL to see the content-length and see that all
>>awaited data have received and close the connection from his side ?
>
> That's what curl does by default.
It don't seems so for me ...
> What curl version on what operating system is this?
We use an own woody-distribution with curl
curl 7.10.3 (i386-pc-linux-gnu) libcurl/7.10.3 OpenSSL/0.9.6c ipv6
zlib/1.1.4
> Have you tried the latest version?
Not so far, but I will ask my sysadmin to update the curl-version and
then we try again. In v 7.10.6 it seems to be fixed
" Content-Length now overrides socket-closed as a means of knowing when
the response body is complete." ... hopyfully it works.
> Can you show us a command line that fails? Can you show us a trace
> output from a failing "session" ?
Ok, I will try the most actual curl-version and if this don't works I
will sends the trace to thge list.
Yesterday I don't fiund the changelist ;-))
Thanks !
>>it would be great if you could answer me in private (apollon_at_schlund.de)
>>too because I'm not on the list actually.
>
>
> Just make sure you keep follow-ups on the mailinglist (you'll be tortured by
> reply-mails saying your post is on hold until an admin has acknowledged it).
>
-- Ingo Fischer _____________________________________________________________________ Ingo Fischer Schlund + Partner AG NOF-Components : http://www.apollon.de Karlsruhe ICQ-Number : 3183043 Tel.: 0721/91374-0 http://www.schlund.de _____________________________________________________________________ ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/Received on 2003-10-29