Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't convert header names to lowercase #74

Closed
gfloyd opened this issue Feb 10, 2016 · 6 comments · Fixed by #178
Closed

Don't convert header names to lowercase #74

gfloyd opened this issue Feb 10, 2016 · 6 comments · Fixed by #178
Assignees

Comments

@gfloyd
Copy link

gfloyd commented Feb 10, 2016

This is a super minor issue of aesthetics, but since HTTP header names are case insensitive, it would be nice if the header names are preserved as provided in the HAR object. I just think it looks nicer in my documentation to have:

-H 'Authorization: Bearer <Your Token>'

Instead of:

-H 'authorization: Bearer <Your Token>'
@ahmadnassri
Copy link
Contributor

I believe there was a reason they were lowered... primarily to avoid duplication, but I have to confirm first ...

@deepakpathania-zz
Copy link

+1

@darrenjennings
Copy link
Contributor

As part of discussion in #83 we will move this forward by not lowercasing headers, not de-duping, and making the code not depend on a lowercases content-type key. Stay tuned for a PR...!

@darrenjennings
Copy link
Contributor

Added a branch with a failing test so we can address this once we get a successful test suite and have more confidence in refactors like this: https://github.com/Kong/httpsnippet/tree/fix/74-dont-lowercase-header-keys

@Blacksmoke16
Copy link

This should depend on the HTTP version being used. HTTP/1.1 says header names are case-insensitive while HTTP/2 requires them to be lowercase.

@RolphH
Copy link

RolphH commented Feb 12, 2020

@darrenjennings when do you expect this (part of #83) to be fixed?

jgiovaresco added a commit to jgiovaresco/httpsnippet that referenced this issue Sep 16, 2020
jgiovaresco added a commit to jgiovaresco/httpsnippet that referenced this issue Sep 16, 2020
jgiovaresco added a commit to jgiovaresco/httpsnippet that referenced this issue Sep 17, 2020
jgiovaresco added a commit to jgiovaresco/httpsnippet that referenced this issue Sep 17, 2020
develohpanda pushed a commit that referenced this issue Sep 17, 2020
* test(headers): failing test for case sensitive headers

* fix: convert header names to lowercase only for HTTP/2 request

Closes #74

Co-authored-by: Darren Jennings <dmjenn02@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants