![](/img/trans.png)
[英]Stream data from a Play Enumerator through Spray using Chunked Responses
[英]Play Framework chunked responses not including chunk sizes
我正在嘗試在 Play 框架中測試分塊響應。
我有一個在 Play 2.3.7 上運行的示例播放應用程序
Play 分塊響應的文檔是這樣說的:
但是,當我完全按照宣傳的那樣嘗試時,我得到:
➜ ~ 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%
我沒有看到在不同塊之間添加的塊長度和 CLRF。 這里發生了什么? 是否有某種需要命中的最小塊大小? 如果是這樣,文檔並沒有真正宣傳...
Duh doih - curl 自動取消響應。
你會想要做:
curl -iv --raw localhost:9000 在上面的例子中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.