cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: HTTPS and session_id

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 6 Dec 2000 13:08:15 +0100 (MET)

On Tue, 5 Dec 2000, Massimo Squillace wrote:

> I am new to the list, but from the searches I performed I found no trace
> of a question about libcurl's treatment of the HTTPS session_id.

No, it has been a long while since we discussed that.

> With the standalone curl executable I tried to connect twice in a row to
> some https protected page, after defining "SSLLogLevel debug" in Apache's
> httpd.conf, and in the ssl_engine_log I saw curl performing twice the
> full SSL Handshake Protocol.
>
> This I could understand, since I run the executable twice; so I changed the
> command line to read:
>
> curl "https://localhost/{one,two}.php"
>
> but obtained the same results. I also tried calling the two URLs above
> via a PHP script using libcurl, but I always observe the same behaviour.

The "multiple URL" support is a pure client-side issue. The client converts
the input to multiple requests to the library. Each request performs its own
handshake.

> Is there a way to ask (lib)curl to send a Client Hello + session_id
> previously emitted by the Web server, in order to lighten the SSL
> protocol overhead in subsequent calls (I understand this is what a
> browser does)?

Browsers do work like that, yes.

> In the answer is no, may I suggest this capability being scheduled for a
> future release?

The problem here is that the easy interface in libcurl does not permit
several files being transfered using the same connection. Thus, this is not
only an issue of implementing persistant connection support but also
introducing a good way for the client to pass the request to the library etc.

Of course I'm all ears if anyone has any suggestion on how to add this.

> Is this perhaps something I should configure in OpenSSL, outside (lib)curl?

No, libcurl would need to sort this out.

> P.S. cURL works great in PHP 4.0.3pl1.

I'm glad it does! I also hear that at least two PHP programming books are
soon coming out that include details on how to use the curl module...

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2000-12-06