【问题标题】:Chunked HTTP request分块的 HTTP 请求
【发布时间】:2018-04-24 08:09:33
【问题描述】:

我尝试在带有 mbedOS 的 ODIN-W2 上使用分块 http 请求。我有下一个 http 请求/响应:

POST /post HTTP/1.1<CR><LF>
Accept: */*<CR><LF>
Accept-Encoding: gzip<CR><LF>
Accept-Language: uk,en-US;q=0.8,en;q=0.5,ru;q=0.3<CR><LF>
Cache-Control: no-cache<CR><LF>
Connection: Keep-Alive<CR><LF>
Host: httpbin.org<CR><LF>
Transfer-Encoding: chunked<CR><LF>
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like 
Gecko<CR><LF>
content-type: application/json<CR><LF>
<CR><LF>
6<CR><LF>
ABCDEF<CR><LF>
0<CR><LF>
<CR><LF>
Status: 411 - Length Required<LF>
<LF>
Headers:<LF>
Date: Tue, 24 Apr 2018 08:01:41 GMT<LF>
Connection: close<LF>
Content-Type: text/html<LF>
Server: meinheld/0.6.1<LF>
Via: 1.1 vegur<LF>
<LF>
Body (92 bytes):<LF>
<html><head><title>Length Required</title></head><body><p>Length Required. 
</p></body></html><LF>

我使用来自 mbedOS 的标准 HTTP 库。

【问题讨论】:

    标签: http chunked-encoding mbed http-chunked


    【解决方案1】:

    这是 httpbin 中的错误,而不是 Mbed HTTP 库中的错误。见https://github.com/requests/httpbin/issues/340。这也是我使用 reqres.in 作为分块请求的示例 URL 的原因。

    【讨论】:

      猜你喜欢
      • 2020-07-02
      • 2016-06-08
      • 2016-10-15
      • 2013-03-14
      • 1970-01-01
      • 1970-01-01
      • 2013-02-15
      • 1970-01-01
      • 2014-06-28
      相关资源
      最近更新 更多