Hey guys,
When I get an error from my API this is what I see:
Ember Data Request PATCH /api/professionals/1044 returned a 403
Payload (Empty Content-Type)
[object Object]
Although my API responds with content-type: "application/json; charset=utf-8" this info is ignored because only the capitalized header is searched (headers["Content-Type"])
Maybe parseResponseHeaders can capitalize the header key names?
Here is a screenshot of my specific case:

@urbany what you are showing there is not ember-data code at all. EDIT should have looked more carefully, it is ED code but surprisingly similar to non-ED code I've been dealing with recently.
I think it's more likely that method should toLowerCase all headers
@runspired no problem, thanks for looking into it! Since is not a big change maybe this can be done in conjunction with #5032
With the release of Chrome 60 and the upcoming release of Safari 11, getAllResponseHeaders always returns lowercase. https://github.com/whatwg/xhr/issues/146.
Should Ember be responsible for always returning lowercase in data/addon/-private/utils/parse-response-headers.js or an app specific concern? (ref https://github.com/emberjs/data/pull/5032)
@darylalexjohnson this is one of those unfortunate things where the state of API standards and design far lags the state of API specs and is largely still the wild west. Especially given how many users utilize APIs they do not control, it seems a simple thing for us to call toLowerCase here.
This one just hit me like a ton of bricks... Chrome (v60, auto-upgrade 馃槏) returning low cased header keys, other browsers returning capitalized header keys; of course, this happens while on vacation.
Lowcasing everything makes sense, as long as the good folks at Google or Mozilla don't decide to remove dashes as well... 馃檮
My original idea was to capitalize the headers (because that was what ED was looking for), but since chrome 60 lowercases everything I think it makes more sense to lowercase all the headers on arrival and only work with lowercased headers afterwards inside ED.
Most helpful comment
@darylalexjohnson this is one of those unfortunate things where the state of API standards and design far lags the state of API specs and is largely still the wild west. Especially given how many users utilize APIs they do not control, it seems a simple thing for us to call
toLowerCasehere.