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

HTTP header name should be returned in lowercase #7

Open
flowersinthesand opened this issue Aug 16, 2015 · 1 comment
Open

HTTP header name should be returned in lowercase #7

flowersinthesand opened this issue Aug 16, 2015 · 1 comment

Comments

@flowersinthesand
Copy link
Member

For the same request, its header may vary according to the underlying platform in terms of case sensitivity. Header has nothing to do with case sensitivity and it doesn't matter at the level of HTTP 1.1 speicification. But, in Java, header is represented as String and it does matter.

// Assumes the same request sent to Servlet and Netty
assertEquals(httpByServlet.headerNames(), httpByNetty.headerNames());

At least, the above assertion should pass. To do that, Every header in returned a set of header string should be lower cased.

@flowersinthesand flowersinthesand added this to the 1.0.0-Beta1 milestone Aug 16, 2015
@flowersinthesand
Copy link
Member Author

Otherwise, it would be better to introduce HttpHeaders as a a representation for headers like http.requestHeaders() and http.responseHeaders() instead of http.headerNames, http.header, http.headers and http.setHeader.

Otherwise, HttpHeaders would be created for one exchange - accessors for request headers e.g. headers.get and mutators for response headers e.g. headers.set.

@flowersinthesand flowersinthesand removed this from the 1.0.0-Beta1 milestone Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant