From f56c6bde2b45218aa2296e7840cff4f652884384 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 9 Apr 2020 12:21:14 -0700 Subject: [PATCH] Revert "Compress requests from the Conduit client to Phabricator" Summary: This reverts commit 7e25288f496887a78d1ba4a54753c2cca09a6336. See T13507 for discussion, shortly. This needs to be switched to capability detection because some server configurations can not actually accept these requests. Test Plan: Straight revert. Differential Revision: https://secure.phabricator.com/D21076 --- src/conduit/ConduitClient.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/conduit/ConduitClient.php b/src/conduit/ConduitClient.php index 8c6c6ad8..065a42ab 100644 --- a/src/conduit/ConduitClient.php +++ b/src/conduit/ConduitClient.php @@ -143,25 +143,12 @@ final class ConduitClient extends Phobject { // Always use the cURL-based HTTPSFuture, for proxy support and other // protocol edge cases that HTTPFuture does not support. - $core_future = new HTTPSFuture($uri); + $core_future = new HTTPSFuture($uri, $data); $core_future->addHeader('Host', $this->getHostStringForHeader()); $core_future->setMethod('POST'); $core_future->setTimeout($this->timeout); - // See T13507. If possible, try to compress requests. We always expect - // Phabricator to be able to accept "Content-Encoding: gzip" requests. - $can_gzip = function_exists('gzencode'); - if ($can_gzip) { - $gzip_data = phutil_build_http_querystring($data); - $gzip_data = gzencode($gzip_data); - - $core_future->addHeader('Content-Encoding', 'gzip'); - $core_future->setData($gzip_data); - } else { - $core_future->setData($data); - } - if ($this->username !== null) { $core_future->setHTTPBasicAuthCredentials( $this->username,