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, Mar 28, 12:03 PM
Unknown Object (File)
Fri, Mar 22, 1:02 AM
Unknown Object (File)
Mon, Mar 18, 6:49 AM
Unknown Object (File)
Feb 4 2024, 7:49 AM
Unknown Object (File)
Jan 29 2024, 11:27 AM
Unknown Object (File)
Jan 24 2024, 4:44 PM
Unknown Object (File)
Jan 4 2024, 3:35 AM
Unknown Object (File)
Dec 27 2023, 10:25 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