Page MenuHomePhabricator

Set content-type to application/json
ClosedPublic

Authored by 20after4 on Mar 29 2017, 9:48 PM.
Tags
None
Referenced Files
F19474604: D17580.id.diff
Wed, Jan 7, 5:39 PM
F19467975: D17580.id42291.diff
Sat, Jan 3, 8:51 PM
F18857543: D17580.id.diff
Nov 1 2025, 3:57 PM
F18854420: D17580.diff
Nov 1 2025, 12:11 AM
F18839038: D17580.diff
Oct 27 2025, 2:03 PM
F18836755: D17580.diff
Oct 27 2025, 3:30 AM
F18752157: D17580.id42292.diff
Oct 4 2025, 2:16 PM
F18651867: D17580.id42301.diff
Sep 21 2025, 5:47 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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16218
Build 21537: Run Core Tests
Build 21536: arc lint + arc unit