WP_HTTP: Allow developers to specify a Accept-Encoding header. Fixes #20142

git-svn-id: https://develop.svn.wordpress.org/trunk@23600 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2013-03-04 03:11:25 +00:00
parent 1df0c7277c
commit 349fb6ed6d
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ class WP_Http {
// Construct Cookie: header if any cookies are set
WP_Http::buildCookieHeader( $r );
if ( WP_Http_Encoding::is_available() )
if ( ! isset( $r['headers']['Accept-Encoding'] ) && WP_Http_Encoding::is_available() )
$r['headers']['Accept-Encoding'] = WP_Http_Encoding::accept_encoding();
if ( ( ! is_null( $r['body'] ) && '' != $r['body'] ) || 'POST' == $r['method'] || 'PUT' == $r['method'] ) {