Changeset View
Changeset View
Standalone View
Standalone View
src/future/http/HTTPSFuture.php
Show First 20 Lines • Show All 263 Lines • ▼ Show 20 Lines | if (!$this->handle) { | ||||
// | // | ||||
// Disable all protocols other than HTTP and HTTPS. | // Disable all protocols other than HTTP and HTTPS. | ||||
$allowed_protocols = CURLPROTO_HTTPS | CURLPROTO_HTTP; | $allowed_protocols = CURLPROTO_HTTPS | CURLPROTO_HTTP; | ||||
curl_setopt($curl, CURLOPT_PROTOCOLS, $allowed_protocols); | curl_setopt($curl, CURLOPT_PROTOCOLS, $allowed_protocols); | ||||
curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS, $allowed_protocols); | curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS, $allowed_protocols); | ||||
} | } | ||||
if (strlen($this->rawBody)) { | if ($this->rawBody !== null) { | ||||
if ($this->getData()) { | if ($this->getData()) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'You can not execute an HTTP future with both a raw request '. | 'You can not execute an HTTP future with both a raw request '. | ||||
'body and structured request data.')); | 'body and structured request data.')); | ||||
} | } | ||||
// We aren't actually going to use this file handle, since we are | // We aren't actually going to use this file handle, since we are | ||||
▲ Show 20 Lines • Show All 598 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0