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

HttpHeader parses Accept header value as lowercase #2266

Closed
rwiskerke opened this issue Oct 25, 2018 · 1 comment
Closed

HttpHeader parses Accept header value as lowercase #2266

rwiskerke opened this issue Oct 25, 2018 · 1 comment

Comments

@rwiskerke
Copy link

When upgrading from 10.0.9 to the current version (10.1.5) of akka-http, one of my test started failing (which specifies a specific Accept Header).

I've been able to recreate it by adding this test to the HttpHeaderSpec:

"Accept: application/vnd.WithCapitals" =!=
  Accept(MediaType.applicationBinary("vnd.WithCapitals", MediaType.Compressible))

So it seems to convert the value part of the Accept header to lowercase. And that's a problem because the matching is currently case-sensitive and I get this error, which is really weird:

Resource representation is only available with these types:
application/json
application/vnd.WithCapitals

So if I copy-paste the application/vnd.WithCapitals mediatype to the Accept header, it will still fail.

@raboof
Copy link
Member

raboof commented Nov 5, 2018

This looks like a duplicate of #2126, unless I'm mistaken?

@raboof raboof closed this as completed Nov 5, 2018
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

2 participants