cURL / Mailing Lists / curl-users / Single Mail


Re: keep-alive HTTP session

From: shlomit lisser <>
Date: Thu, 16 Jan 2003 00:01:56 +0200


ok, after some reading, sending the keep-alive header is really optional
and it will
not work if the appropriate token is not being sent. However according to
your reply
if I put two consecutive URLs in a command line (both from the same site)
cURL will
use the same connection, right?
well that is what I'm doing, I'm sending a login request (post) to a secure
site and then a link
inside the site that should retrieve some data, and it looks that the
connection is being closed after
the first page is being received ( I'm getting a 'Closing connection #0'line
in cURL output) and opened again re-using the SSL session id. The second
page received
specify that the user already logged in, which coincide with the above.
Also the second url should be a get request and it is sent as a post (due
to the first request I guess).
I can send the detailed output if it will help, but if you can clarify


On Wed, 15 Jan 2003, shlomit lisser wrote:
> If I understand correctly from recent posting, keep-alive option will not
> work using the command line tool of curl?
You must be confusing things, or the posting you refer to must've mentioned
something more specific than just this.
There is no keep-alive option in curl. Curl will always keep connections
alive by default.
> --> curl -i -o tmp.tmp --cacert ..... -H Proxy-Connection:
> keep-alive one-url another-url
> will not work?
That header is not a RFC2616 header. curl will do persistent connections
without that header-fiddling attempt, if the URLs are from the same site(s).


This SF.NET email is sponsored by: A Thawte Code Signing Certificate
is essential in establishing user confidence by providing assurance of
authenticity and code integrity. Download our Free Code Signing guide:
Received on 2003-01-15