http
http copied to clipboard
Changed preserveHeaderCase from false to true for request headers.
I have changed preserveHeaderCase
for headers from false
to true
. The custom headers defined in the back end server were not accepting the case-sensitive header (X-Auth-Signature
).
The result was that I couldn't make API requests and was getting 401 unauthorized responses all the time.
Once after setting preserveHeaderCase
to true API has started working. Consider this change or is that it is possible to change preserveHeaderCase
from post/get/put/delete
methods, where actual API requests are made.
This is a problem that most others are experiencing as well - #Reference Link
@brianquinlan, @kevmoo, @mit-mit, @natebosch, @devoncarew, @osa1, @Hamaad-Siddiqui, @aam, @guyluz11
Thank You
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
I'm not sure if we need to wait to release this as a major version change with other breaking changes.
https://github.com/dart-lang/http/issues/609
Would this change cause a semantic difference between browser_client
and io_client
?
Would this change cause a semantic difference between
browser_client
andio_client
?
I don't think so. I think there is currently a semantic difference and this would remove it. AFAIK the browser does not change the case of headers.
This change does break some tests, but not many IIRC.