You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've inherited a project using this library, and upon updating from 0.2 to 0.3 json responses aren't being parsed as they were previously in 0.2. I'll do a bit of investigating to try figure out why, but for the moment i've pinned it back to 0.2.
The text was updated successfully, but these errors were encountered:
Ok, so I figured out the issue. The library parses the incoming headers straight from curl, and adds them to the array in whatever casing the appear as.
In 0.2.x, the behavior was lowercase all of the incoming headers, and then lowercase the requested header name before trying to grab it out of the array. This means that whatever the casing in the response, the header can always be found.
In 0.3.x, this behaviour was changed to no longer modify the header casing when parsing the response, and also removing the lowercasing when accessing headers. This means that unless the header is cased exactly the same as requested, it cannot be accessed. This is wrong according to the HTTP spec (and other HTTP implementations).
In HTTP2, all headers are lowercase, meaning that mime parsing will never work in the package.
I'm going to PR a failing test and then a fix when I get a chance :)
I've inherited a project using this library, and upon updating from
0.2
to0.3
json responses aren't being parsed as they were previously in0.2
. I'll do a bit of investigating to try figure out why, but for the moment i've pinned it back to0.2
.The text was updated successfully, but these errors were encountered: