Doc #79097 [Ver->Csd]: CURLOPT_HTTP_CONTENT_DECODING is not documented

From: Date: Sun, 12 Jan 2020 10:11:54 +0000
Subject: Doc #79097 [Ver->Csd]: CURLOPT_HTTP_CONTENT_DECODING is not documented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17196@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79097&edit=1 ID: 79097 Updated by: cmb@php.net Reported by: 839325966 at qq dot com Summary: CURLOPT_HTTP_CONTENT_DECODING is not documented -Status: Verified +Status: Closed Type: Documentation Problem Package: cURL related Operating System: centos 7.7 PHP Version: 7.2.26 Assigned To: cmb Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-01-12 10:11:40] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=348881 Log: Fix #79097: CURLOPT_HTTP_CONTENT_DECODING is not documented ------------------------------------------------------------------------ [2020-01-11 14:15:27] cmb@php.net You have to add curl_setopt($curl, CURLOPT_HTTP_CONTENT_DECODING, false); CURLOPT_HTTP_CONTENT_DECODING is available as of PHP 5.5.0 if built against libcurl >= 7.16.2. Since this is not documented, changing to doc bug. ------------------------------------------------------------------------ [2020-01-11 03:16:22] 839325966 at qq dot com Description: ------------ when set CURLOPT_ENCODING "gzip", can't get raw data responsed. Test script: --------------- <?php $url = "https://bugs.php.net/report.php"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 30); curl_setopt($curl, CURLOPT_ENCODING, 'gzip, deflate'); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); $responseBody = curl_exec($curl); $headerArray = curl_getinfo($curl); if (strlen($responseBody) != $headerArray['size_download']) { printf("error, response data length:%d, download size:%d\n", strlen($responseBody), $headerArray['size_download']); } Expected result: ---------------- reuse CURLOPT_BINARYTRANSFER suggest ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79097&edit=1

« previous php.doc.bugs (#17196) next »