zendframework / zend-http

Http component from Zend Framework
BSD 3-Clause "New" or "Revised" License
134 stars 85 forks source link

Do not upper case first character of headers in socket adapter #161

Closed DaDeather closed 5 years ago

DaDeather commented 6 years ago

This PR Fixes #160 which causes headers being upper cased for their first character in key which causes a fail request to a non HTTP 1.1 compliant API.

HTTP 1.1 defines that the headers should be case insensitive. This means there is also no reason for upper casing the first character.

tptrixtop commented 6 years ago

May be make this feature optional, like property in class by default use ucfirst and if you need you could change that behaviour?)

DaDeather commented 6 years ago

May be make this feature optional, like property in class by default use ucfirst and if you need you could change that behaviour?)

I can't tell if it would make sense to have a property to configure whatever it should be upper cased or not. The only thing I can say is that its already not being modified for the Curl and Proxy adapter. So I would assume that either this (the Socket and Test adapter) or the behaviour of Curl and Proxy adapter is not the desired one.

tptrixtop commented 6 years ago

That make sense i think, i was just thinking about back compatibility, but that make no sense in that case)

also some test are not successful after your changes, i think you need investigate test report)

weierophinney commented 5 years ago

Thanks, @DaDeather; merged to develop for release with 2.9.0.