Closed GithubUser8080 closed 2 weeks ago
@GithubUser8080 Just taking a quick look, maybe this line could be related? https://github.com/playframework/play-ws/blob/1f4f1d10aac594c6476fd53b550503a98c473a18/play-ws-standalone/src/main/scala/play/api/libs/ws/StandaloneWSResponse.scala#L73
@GithubUser8080 Just taking a quick look, maybe this line could be related?
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
Streamed response
Thanks
@GithubUser8080 fix released:
Please let me now if that works for you now, 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.