You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to set CURLOPT_ACCEPT_ENCODING to NULL #11433
According to the CURL documentation (https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html) setting CURLOPT_ACCEPT_ENCODING to a null value (not an empty string) will prevent it from decompressing the returned data stream. This is desirable in a caching/proxy scenario.
Currently this is not possible as PHP will always provide a string to this value.
I have just noticed that the default is NULL if the option is not set at all, simply providing the content-encoding header will result in the compressed content being returned in it's original form. This though IMO is still a bug as setting NULL should actually set NULL so that one doesn't have to rely on defaults that may change in the future.
Activity
gnif commentedon Jun 12, 2023
I have just noticed that the default is
NULLif the option is not set at all, simply providing the content-encoding header will result in the compressed content being returned in it's original form. This though IMO is still a bug as settingNULLshould actually setNULLso that one doesn't have to rely on defaults that may change in the future.Fix phpGH-11433: Unable to set CURLOPT_ACCEPT_ENCODING to NULL
Fix GH-11433: Unable to set CURLOPT_ACCEPT_ENCODING to NULL
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
File: extract curl initialization to separate function
File: extract curl initialization to separate function
File: extract curl initialization to separate function
File: extract curl initialization to separate function
File: extract curl initialization to separate function