php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42911 CURLOPT_ENCODING doesn't seem to support 'gzip'
Submitted: 2007-10-10 03:21 UTC Modified: 2007-10-21 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: dmceo415 at yahoo dot com Assigned:
Status: No Feedback Package: cURL related
PHP Version: 4.4.7 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
42 + 2 = ?
Subscribe to this entry?

 
 [2007-10-10 03:21 UTC] dmceo415 at yahoo dot com
Description:
------------
The manual has this to say about CURLOPT_ENCODING:

'The contents of the "Accept-Encoding: " header. This enables decoding of the response. Supported encodings are "identity", "deflate", and "gzip". If an empty string, "", is set, a header containing all supported encoding types is sent.'

However, when I use curl_setopt($ch, CURLOPT_ENCODING, 'gzip') in a script, CURLOPT_VERBOSE tells me:

* Unrecognized content encoding type. libcurl understands 'identity' and 'deflate' content encodings.

So, is the manual wrong, or is there a bug with respect to the 'gzip' encoding?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-10 13:49 UTC] dmceo415 at yahoo dot com
(changing my email address)
 [2007-10-10 21:52 UTC] daniel at haxx dot se
It seems you're using a very old libcurl version... That text was modified in 7.10.5 - which is well over 4 years old!
 [2007-10-13 13:08 UTC] mj@php.net
Works fine for me with PHP 5.3-dev and libcurl 7.17.0.  Can you please upgrade to a more recent version of libcurl and try again?  Thanks!
 [2007-10-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2019-05-14 12:30 UTC] php at herber-edv dot de
Problem is back in cURL 7.58.0 + PHP 7.3.5. But only some few URLs cause this problem.

curl_setopt($cl, CURLOPT_ENCODING, 'gzip');

If CURLOPT_ENCODING is used (no mather which value!), curl returns this error: "Unrecognized content encoding type. libcurl understands deflate, gzip content encodings."
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Feb 22 18:01:27 2020 UTC