Page MenuHomePhabricator

Set content-type to application/json
ClosedPublic

Authored by 20after4 on Mar 29 2017, 9:48 PM.
Tags
None
Referenced Files
F14449524: D17580.diff
Thu, Dec 26, 10:23 PM
Unknown Object (File)
Thu, Dec 19, 5:12 PM
Unknown Object (File)
Wed, Dec 18, 2:11 AM
Unknown Object (File)
Thu, Dec 12, 2:40 PM
Unknown Object (File)
Mon, Dec 9, 12:04 AM
Unknown Object (File)
Sat, Dec 7, 8:43 AM
Unknown Object (File)
Fri, Nov 29, 5:31 AM
Unknown Object (File)
Nov 26 2024, 8:55 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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16218
Build 21537: Run Core Tests
Build 21536: arc lint + arc unit