Page MenuHomePhabricator

Set content-type to application/json
ClosedPublic

Authored by 20after4 on Mar 29 2017, 9:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 29, 9:12 AM
Unknown Object (File)
Wed, May 28, 1:57 PM
Unknown Object (File)
Tue, May 6, 11:06 AM
Unknown Object (File)
Apr 23 2025, 1:29 AM
Unknown Object (File)
Apr 19 2025, 1:08 AM
Unknown Object (File)
Apr 12 2025, 9:20 PM
Unknown Object (File)
Apr 12 2025, 5:40 AM
Unknown Object (File)
Apr 11 2025, 3:53 PM
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