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

git-svn-id: http://core.svn.wordpress.org/trunk@23600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2013-03-04 03:11:25 +00:00
parent 4b4b35ae3b
commit 78e4b5afde
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 // Construct Cookie: header if any cookies are set
WP_Http::buildCookieHeader( $r ); 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(); $r['headers']['Accept-Encoding'] = WP_Http_Encoding::accept_encoding();
if ( ( ! is_null( $r['body'] ) && '' != $r['body'] ) || 'POST' == $r['method'] || 'PUT' == $r['method'] ) { if ( ( ! is_null( $r['body'] ) && '' != $r['body'] ) || 'POST' == $r['method'] || 'PUT' == $r['method'] ) {