Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

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

Closed
wants to merge 1 commit into from
Closed

Conversation

DaDeather
Copy link
Contributor

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.

  • Are you fixing a bug?
    • Detail the original, incorrect behavior.
      The first character in a headers "name"/"key" was being upper cased in default for Socket and Test adapter.
    • Detail the new, expected behavior.
      The headers using the Socket and Test adapter should not be be upper cased for the first character any more.

@tptrixtop
Copy link

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

@DaDeather
Copy link
Contributor Author

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
Copy link

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 weierophinney added this to the 2.9.0 milestone Jan 7, 2019
@weierophinney weierophinney changed the title remove upper casing first character on headers in socker class Do not upper case first character of headers in socket adapter Jan 8, 2019
weierophinney added a commit that referenced this pull request Jan 8, 2019
Do not upper case first character of headers in socket adapter
weierophinney added a commit that referenced this pull request Jan 8, 2019
weierophinney added a commit that referenced this pull request Jan 8, 2019
@weierophinney
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passed headers are upper cased on first character by default
3 participants