Page MenuHomePhabricator

Set content-type to application/json
ClosedPublic

Authored by 20after4 on Mar 29 2017, 9:48 PM.
Tags
None
Referenced Files
F15414526: D17580.diff
Thu, Mar 20, 1:00 AM
F15408699: D17580.id42291.diff
Wed, Mar 19, 12:51 AM
F15400537: D17580.id42292.diff
Mon, Mar 17, 12:22 PM
Unknown Object (File)
Sat, Feb 22, 12:15 PM
Unknown Object (File)
Fri, Feb 21, 3:16 PM
Unknown Object (File)
Feb 14 2025, 2:50 PM
Unknown Object (File)
Feb 3 2025, 7:31 PM
Unknown Object (File)
Jan 29 2025, 7:18 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