Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15402562
D13417.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
D13417.diff
View Options
diff --git a/src/future/http/HTTPSFuture.php b/src/future/http/HTTPSFuture.php
--- a/src/future/http/HTTPSFuture.php
+++ b/src/future/http/HTTPSFuture.php
@@ -420,7 +420,9 @@
// NOTE: We want to use keepalive if possible. Return the handle to a
// pool for the domain; don't close it.
- self::$pool[$domain][] = $curl;
+ if ($this->shouldReuseHandles()) {
+ self::$pool[$domain][] = $curl;
+ }
$profiler = PhutilServiceProfiler::getInstance();
$profiler->endServiceCall($this->profilerCallID, array());
@@ -666,5 +668,19 @@
return $bytes;
}
+ private function shouldReuseHandles() {
+ $curl_version = curl_version();
+ $version = idx($curl_version, 'version');
+
+ // NOTE: cURL 7.43.0 has a bug where the POST body length is not recomputed
+ // properly when a handle is reused. For this version of cURL, disable
+ // handle reuse and accept a small performance penalty. See T8654.
+ if ($version == '7.43.0') {
+ return false;
+ }
+
+ return true;
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 11:01 PM (3 d, 55 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7702544
Default Alt Text
D13417.diff (1 KB)
Attached To
Mode
D13417: Probable fix for cURL 7.43.0 issue
Attached
Detach File
Event Timeline
Log In to Comment