letsgoyeti
letsgoyeti

Reputation: 338

Play Framework chunked responses not including chunk sizes

I'm trying to test out chunked responses in the Play Framework.

I have a sample play app that's running on Play 2.3.7

The documentation for Play chunked responses says this:

enter image description here

However when I try it exactly as advertised, I get:

➜  ~ curl -i -v localhost:9000
* Rebuilt URL to: localhost:9000/
*   Trying ::1...
* Connected to localhost (::1) port 9000 (#0)
> GET / HTTP/1.1
> Host: localhost:9000
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Type: text/plain; charset=utf-8
Content-Type: text/plain; charset=utf-8
< Transfer-Encoding: chunked
Transfer-Encoding: chunked

<
* Connection #0 to host localhost left intact
kikifoobar%

I don't see the chunk lengths and CLRFs added in between the different chunks. What's going on here? Is there some kind of minimum chunk size that needs to be hit? If so, the documentation doesn't really advertise that...

Upvotes: 0

Views: 628

Answers (1)

letsgoyeti
letsgoyeti

Reputation: 338

Duh doih - curl auto unchunks the responses.

You'll want to do:

curl -iv --raw localhost:9000 in the example above

Upvotes: 3

Related Questions