1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00

Always use HTTPSFuture in elasticsearch.

Test Plan: Search elasticly.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2685
This commit is contained in:
vrana 2012-06-08 10:38:55 -07:00
parent bad22cb303
commit 2a09563533

View file

@ -203,23 +203,13 @@ final class PhabricatorSearchEngineElastic extends PhabricatorSearchEngine {
$uri->setPath($path); $uri->setPath($path);
$protocol = $uri->getProtocol(); $future = new HTTPSFuture($uri, $data);
if ($protocol == 'https') {
$future = new HTTPSFuture($uri, $data);
} else {
$future = new HTTPFuture($uri, $data);
}
if ($is_write) { if ($is_write) {
$future->setMethod('PUT'); $future->setMethod('PUT');
} else {
$future->setMethod('GET');
} }
if ($this->getTimeout()) { if ($this->getTimeout()) {
$future->setTimeout($this->getTimeout()); $future->setTimeout($this->getTimeout());
} }
list($body) = $future->resolvex(); list($body) = $future->resolvex();
if ($is_write) { if ($is_write) {