【问题标题】:Play Framework chunked responses not including chunk sizes播放框架分块响应不包括块大小
【发布时间】:2016-05-04 00:26:49
【问题描述】:

我正在尝试在 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。这里发生了什么?是否有某种需要达到的最小块大小?如果是这样,文档并没有真正宣传...

【问题讨论】:

    标签: scala playframework chunked-encoding


    【解决方案1】:

    Duh doih - curl 自动取消对响应的分块。

    你会想要做的:

    上例中的curl -iv --raw localhost:9000

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-11
      • 1970-01-01
      • 1970-01-01
      • 2014-05-28
      • 1970-01-01
      • 2016-12-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多