curl-and-php
Re: 2 questions: keep-alives and http compression
Date: Mon, 4 Jul 2005 14:06:33 +0200 (CEST)
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.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-07-04