Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15336181
D21073.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21073.diff
View Options
diff --git a/src/conduit/ConduitClient.php b/src/conduit/ConduitClient.php
--- a/src/conduit/ConduitClient.php
+++ b/src/conduit/ConduitClient.php
@@ -143,12 +143,25 @@
// Always use the cURL-based HTTPSFuture, for proxy support and other
// protocol edge cases that HTTPFuture does not support.
- $core_future = new HTTPSFuture($uri, $data);
+ $core_future = new HTTPSFuture($uri);
$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,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 9, 6:22 PM (2 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390526
Default Alt Text
D21073.diff (1 KB)
Attached To
Mode
D21073: Compress requests from the Conduit client to Phabricator
Attached
Detach File
Event Timeline
Log In to Comment