playframework/playframework — pull request #2127 by jroper (2014-08-26 06:43:44+00:00)
Title: Play tries to chunk response when not allowed by request

I'm trying to return an InputStream from a URL and it is failing with the error:

The response to this request is chunked and hence requires HTTP 1.1 to be sent, but this is a HTTP 1.0 request.

The code I'm using is:

try (InputStream is = new URL(url).openStream()) {
return ok(is);
}

It's odd that Play knows it cannot chunk the response and yet tries to anyway.