mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
Revert "Compress requests from the Conduit client to Phabricator"
Summary:
This reverts commit 7e25288f49
. 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
This commit is contained in:
parent
7e25288f49
commit
f56c6bde2b
1 changed files with 1 additions and 14 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue