php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #23702 Please add "Accept-encoding: gzip"/"--compressed" option to CURL functions
Submitted: 2003-05-19 12:48 UTC Modified: 2004-08-07 10:52 UTC
From: stephen at pierzchala dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.2RC3 OS: RedHat 8.0
Private report: No CVE-ID: None
 [2003-05-19 12:48 UTC] stephen at pierzchala dot com
With the release of cURL 7.10.5, the ability to add the "--compressed" option to the command line gives people the ability to request compressed content if the server offers the option.

Will this feature be added to the curl_setopt() family of functions?

Thanks,
Stephen Pierzchala

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-19 17:06 UTC] sniper@php.net
It's already there: CURLOPT_ENCODING

 [2003-05-19 17:08 UTC] sniper@php.net
Better make this documentation problem, couple of other
options are also not documented.

 [2003-05-19 22:33 UTC] stephen at pierzchala dot com
Thanks for this...I know it is a documentation issue and I know it accepts a string value...but how do you activate this feature?

I am using cURL 7.10.5

Thanks
 [2003-06-07 13:45 UTC] julian_bond at voidstar dot com
As far as I can see this option is not working in Win32 4.3.2 
curl_setopt ($ch, CURLOPT_ENCODING,"") and 
curl_setopt ($ch, CURLOPT_ENCODING,"gzip") don't throw errors, but they also don't generate the Accept-Encoding: header.

At a guess php_curl.dll is being built without zlib support.
 [2003-07-11 07:15 UTC] julian_bond at voidstar dot com
Just done some analysis on this in two setups. Both 4.3.2
1. Win32 using php_curl.dll libcurl/7.10.5 OpenSSL/0.9.7b
2. redhat 7.3, compiled with '--with-curl', libcurl/7.10.2 OpenSSL/0.9.6 zlib/1.1.4

In both cases, CURLOPT_ENCODING is being ignored. no matter what parameter is added, the Accept-Encoding: header is never generated. If gzip content is forced to be returned, curl doesn't decode it.

Whether the problem is with curl or php I'm not sure.
 [2003-07-14 03:27 UTC] julian_bond at voidstar dot com
Yet another data point. I upgraded curl to 7.10.5 on linux (doh!). curl --compressed now works. But CURLOPT_ENCODING still doesn't.

The curl docs say that curl needs to be compiled with zlib to support compression. It looks like MS Win 4.3.2 and 4.3.3rc1 don't do this, given that curl_info() reports "libcurl/7.10.5 OpenSSL/0.9.7b" while linux reports "libcurl/7.10.2 OpenSSL/0.9.6 zlib/1.1.4".

This bug is currently category "documentation problem". I believe it should be treated as a code problem. I'd really like to see it fixed in 4.3.3
 [2003-07-20 10:24 UTC] sniper@php.net
The source bug is fixed now. Documentation still needs work.

 [2004-08-07 10:52 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Fixed by Dave.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 00:01:31 2024 UTC