ID:               24725
 Updated by:       [EMAIL PROTECTED]
 Reported By:      Julian_bond at voidstar dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         cURL related
-Operating System: Redhat 7.3 and MS Win
+Operating System: win32 only
 PHP Version:      4.3.2
-Assigned To:      
+Assigned To:      edink
 New Comment:

Just a build issue with curl libs. (Edin, can you add zlib in the curl
stuff?)



Previous Comments:
------------------------------------------------------------------------

[2003-07-20 08:38:41] [EMAIL PROTECTED]

DO NOT use 'Add Comment' when you edit your own report!!!
(use this url: http://bugs.php.net/bug.php?id=24725&edit=2)


------------------------------------------------------------------------

[2003-07-20 08:26:50] julian_bond at voidstar dot com

Installed MS Win release. phpinfo() reports
php/4.3.3RC2-dev, libcurl/7.10.5 OpenSSL/0.9.7b
No change. Curl is still not generating the header. php-curl still does
not appear to support zlib.

Currently creating a test environment where I can test php under Redhat
as I found the problem on a production server. Might take a little
while. Will report back.

------------------------------------------------------------------------

[2003-07-20 07:09:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

------------------------------------------------------------------------

[2003-07-20 06:56:49] Julian_bond at voidstar dot com

Description:
------------
Redhat/7.3 php/4.3.2 libcurl/7.10.5 OpenSSL/0.9.6b zlib/1.1.4
MS Win php/4.3.2 libcurl/7.10.5 OpenSSL/0.9.7b
MS Win php/4.3.3RC1 libcurl/7.10.5 OpenSSL/0.9.7b

See also:
http://bugs.php.net/bug.php?id=23048
http://bugs.php.net/bug.php?id=21995
http://bugs.php.net/bug.php?id=23702

According to the libcurl docuentation, 
  curl_setopt ($ch, CURLOPT_ENCODING,"");
should generate a header 
  HTTP_ACCEPT_ENCODING: gzip,deflate 
And then autodecode the returned data if the remote server supports
compression. However in the above three PHP releases it never does.
Reading the three bug reports above, it appears that support for this
option call may have been added to php 4.3.2 and so the problem is
currently viewed as a documentation problem. However after repeated
tests, it still appears to be missing from either php and/or libcurl
and hence this bug report. The libcurl crew deny responsibility(!) and
point at the php implementation. Using curl from the command line with
the --compressed option I can see the header and auto-decoding working
but I don't have the facilities to check the libcurl library except
from inside php.

The libcurl readme
http://cvs.php.net/co.php/curl/lib/README.encoding?r=1.3
says that "The library zlib is required for this feature." but as can
be seen above from the version report, php_curl.dll for windows does
not appear to bind the zlib library, so even if the parameter option is
being passed to libcurl, it probably wouldn't work anyway.

Reproduce code:
---------------
  $ch = curl_init("http://www.voidstar.com/temp/accept.php";);
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt ($ch, CURLOPT_ENCODING,"");
  curl_setopt ($ch, CURLOPT_HEADER, 1);

  $data = curl_exec($ch);

  curl_close ($ch);

  print "<pre>" . htmlentities($data) . "</pre>";


Expected result:
----------------
http://www.voidstar.com/temp/accept.php prints the headers it receives.
It's running on a server with zlib support compiled into php and
zlib.output_compression = on This can be seen by using a browser that
supports gzip to navigate to the url above. In this case the header can
be seen.

The reproduce code above should generate the accept_encoding header
which should then result in it being mirrored back to curl which then
displays it.

 HTTP_ACCEPT_ENCODING: gzip,deflate

Actual result:
--------------
Missing header
 HTTP_ACCEPT_ENCODING: gzip,deflate


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24725&edit=1

Reply via email to