Page MenuHomePhabricator

Set content-type to application/json
ClosedPublic

Authored by 20after4 on Mar 29 2017, 9:48 PM.
Tags
None
Referenced Files
F18619564: D17580.id42301.diff
Mon, Sep 15, 2:47 AM
F18601626: D17580.diff
Sat, Sep 13, 1:02 PM
F18592459: D17580.id.diff
Fri, Sep 12, 12:17 PM
F18592377: D17580.id.diff
Fri, Sep 12, 12:06 PM
F18544609: D17580.id42301.diff
Mon, Sep 8, 1:06 AM
F18512697: D17580.id42292.diff
Fri, Sep 5, 8:27 AM
F18500772: D17580.diff
Thu, Sep 4, 9:19 PM
F18095845: D17580.id42291.diff
Aug 8 2025, 2: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
Lint
Lint Not Applicable
Unit
Tests Not Applicable