cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: curl-and-php Digest, Vol 18, Issue 2

From: Gaetano Giunta <giunta.gaetano_at_sea-aeroportimilano.it>
Date: Tue, 5 Jul 2005 14:48:48 +0200

Thanks for the quick and precise answers (as always).

The keep-alive feature is most interesting to me, and I have a few more questions about that: what will happen if I reuse the same CURL handle to operate a second POST but change in the meantime the values set to these options:
- CURLOPT_USERPWD
- CURLOPT_SSLCERT
- CURLOPT_SSLCERTPASSWD
- CURLOPT_SSL_VERIFYPEER
- CURLOPT_SSL_VERIFYHOST
- CURLOPT_PROXY
- CURLOPT_PROXYUSERPWD

will the lib automatically take care of that?

Bye
Gaetano

> Date: Mon, 4 Jul 2005 14:06:33 +0200 (CEST)
> From: Daniel Stenberg <daniel-curl_at_haxx.se>
> Subject: Re: 2 questions: keep-alives and http compression
> To: Programming PHP/CURL <curl-and-php_at_cool.haxx.se>
> Message-ID: <Pine.LNX.4.63.0507041113470.17471_at_yvahk3.pbagnpgbe.fr>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
> On Mon, 4 Jul 2005, Gaetano Giunta wrote:
>
> > 1 - keep-alives: is it possible to send multiple http
> requests from PHP-curl
> > without closing the socket to the HTTP server? If so, how can it be
> > enabled/disabled?
>
> http://curl.haxx.se/docs/faq.html#7.3
>
> You disable that ability in libcurl by closing the handle
> after the transfer,
> without reusing it.
>
> > 2 - compression: does the support for CURL receiving
> compressed data does
> > depend upon compile-time options (ie explicit linking with
> zlib vs. php
> > linking with zlib)?
>
> PHP/CURL is just a glue layer on top of libcurl. All transfer
> and socket
> related stuff is made by libcurl and thus your libcurl must
> have been built
> with zlib support.
>
> > what happens if curl is compiled without that support and
> the PHP coder sets
> > CURLOPT_ENCODING to 'gzip'? will curl send the gzip header
> to the sender and
> > then pass un-decompressed data back to PHP?
>
> Yes. You are supposed to pass a "" to libcurl if you want to
> enable the
> compression(s) libcurl supports. This is documented in the
> libcurl docs.
>
Received on 2005-07-05