@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Set content-type to application/json

Summary:
Elasticsearch really wants a raw json body and it fails to accept
the request as of es version 5.3

Test Plan:
Tested with elasticsearch 5.2 and 5.3.

Before this change 5.2 worked but 5.3 failed with
`HTTP/406 "Content-Type header [application/x-www-form-urlencoded] is not supported"` [1]

After this change, both worked.

[1] https://phabricator.wikimedia.org/P5158

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17580

authored by

Mukunda Modell and committed by
20after4
67a1c404 654f0f60

+2
+2
src/applications/search/fulltextstorage/PhabricatorElasticFulltextStorageEngine.php
··· 551 551 $uri = $host->getURI($path); 552 552 $data = phutil_json_encode($data); 553 553 $future = new HTTPSFuture($uri, $data); 554 + $future->addHeader('Content-Type', 'application/json'); 555 + 554 556 if ($method != 'GET') { 555 557 $future->setMethod($method); 556 558 }