-
Notifications
You must be signed in to change notification settings - Fork 86
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
Streamed response headers are case sensitive #908
Comments
@GithubUser8080 Just taking a quick look, maybe this line could be related? play-ws/play-ws-standalone/src/main/scala/play/api/libs/ws/StandaloneWSResponse.scala Line 73 in 1f4f1d1
|
I will try to remember the exact line, but if i remember correctly, all other response types, when getting headers, return a TreeMap copy of headers with case insensitive keys. Whereas StreamedResponse getHeaders() returns the original case sensitive map of headers from the underlying response. |
Normal response play-ws/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSResponse.java Line 64 in 1f4f1d1
Streamed response play-ws/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StreamedResponse.java Line 66 in 1f4f1d1
|
Thanks |
Please let me now if that works for you now, thanks! |
It does, thank you for the fast response! |
When the request has .streamed(), then all methods to get headers, like response.getContentType() fail if the case is not an exact match. E.g for response
Content-Type : application/json
, response.getContentType() returns octet-stream. It only succeeds if the headers are all lowercase. Normally header matching must be case insensitive.The text was updated successfully, but these errors were encountered: