From 349fb6ed6de1333341e83c877047bf3cca3c528a Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 4 Mar 2013 03:11:25 +0000 Subject: [PATCH] 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 --- wp-includes/class-http.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index a9738ee1d2..7f838a6c8b 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -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'] ) {