mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +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:
parent
bad22cb303
commit
2a09563533
1 changed files with 1 additions and 11 deletions
|
@ -203,23 +203,13 @@ final class PhabricatorSearchEngineElastic extends PhabricatorSearchEngine {
|
|||
|
||||
$uri->setPath($path);
|
||||
|
||||
$protocol = $uri->getProtocol();
|
||||
if ($protocol == 'https') {
|
||||
$future = new HTTPSFuture($uri, $data);
|
||||
} else {
|
||||
$future = new HTTPFuture($uri, $data);
|
||||
}
|
||||
|
||||
if ($is_write) {
|
||||
$future->setMethod('PUT');
|
||||
} else {
|
||||
$future->setMethod('GET');
|
||||
}
|
||||
|
||||
if ($this->getTimeout()) {
|
||||
$future->setTimeout($this->getTimeout());
|
||||
}
|
||||
|
||||
list($body) = $future->resolvex();
|
||||
|
||||
if ($is_write) {
|
||||
|
|
Loading…
Reference in a new issue