Page MenuHomePhabricator

Set content-type to application/json
ClosedPublic

Authored by 20after4 on Mar 29 2017, 9:48 PM.
Tags
None
Referenced Files
F13140322: D17580.diff
Fri, May 3, 3:38 AM
Unknown Object (File)
Mon, Apr 29, 3:36 PM
Unknown Object (File)
Wed, Apr 24, 11:37 PM
Unknown Object (File)
Thu, Apr 11, 7:57 AM
Unknown Object (File)
Sun, Apr 7, 7:59 AM
Unknown Object (File)
Apr 2 2024, 2:24 AM
Unknown Object (File)
Mar 28 2024, 12:03 PM
Unknown Object (File)
Mar 22 2024, 1:02 AM
Subscribers

Details

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

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable