Page MenuHomePhabricator

Set content-type to application/json
ClosedPublic

Authored by 20after4 on Mar 29 2017, 9:48 PM.
Tags
None
Referenced Files
F19857357: D17580.id42292.diff
Fri, Mar 13, 11:59 PM
F19836616: D17580.diff
Wed, Mar 11, 12:20 PM
F19829900: D17580.id42301.diff
Tue, Mar 10, 9:17 AM
F19829898: D17580.id42301.diff
Tue, Mar 10, 9:12 AM
F19815760: D17580.id42301.diff
Thu, Mar 5, 12:44 AM
F19703786: D17580.id42292.diff
Feb 11 2026, 2:46 AM
F19532707: D17580.id42291.diff
Jan 20 2026, 12:58 PM
F19523048: D17580.diff
Jan 17 2026, 12:59 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