分块的HTTP请求

时间:2018-04-24 08:09:34

标签: http chunked-encoding mbed http-chunked

我尝试在ODIN-W2上使用chbeded http请求和mbedOS。我有下一个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库。

1 个答案:

答案 0 :(得分:0)

这是httpbin中的错误,而不是Mbed HTTP库中的错误。见enter image description here。这也是我使用reqres.in作为分块请求的示例URL的原因。