-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($http): ensure case-insens. header overriding #2105
Conversation
This is valuable change and improves existing functionality but in terms of implementation we could probably save some bytes. @caiotoon could you try to have another implementation and see if this couldn't be simplified / made smaller? Let me know if you need any help. |
|
@caiotoon You will need to sign the CLA as well. |
Hi, @pkozlowski-opensource. Made it a bit smaller at the trade off of performance at some unnecessary loops (as long as I saw, it's not possible to interrupt a Regarding the pendencies,
Thanks! |
Sure. Just let me know. |
@IgorMinar any update on this one? |
@petebacondarwin rebased and resolved. I'm not pretty sure if I did everything right, feel free to instruct further. |
I'm not pretty sure, but I believe I did something wrong while rebasing and other changes are being included in this commit as it was mine. I'll try to figure out where I messed up rebasing and will commit again. I'll post here when I believe this pull is ready to be accepted. |
If user send content-type header, both content-type and default Content-Type headers were sent. Now default header overriding is case-insensitive.
Refactored the code to save some bytes.
@petebacondarwin it's now properly rebased and resolved. Ready to merge. |
Merged to master at 53359d5. |
And landed in stable as 25d9f5a |
Thanks @caiotoon for your work and patience! |
Nice! No problem. |
If user send content-type header, both content-type and default
Content-Type headers were sent. Now default header overriding is
case-insensitive.
As per RFC 2616, "[header] Field
names are case-insensitive".
Before this fix, the following test would fail: