HTTP: Illegal chunked encoding

不问归期 提交于 2019-12-06 10:01:40

The header of the request is as follows:

POST /osci-manager-entry/externalentry HTTP/1.0
Host: [the-host]
Content-Length: 3984
Proxy-Connection: Keep-Alive

The header of the response contains this:

HTTP/1.0 200 OK
Date: Mon, 04 Jan 2016 12:10:31 GMT
Transfer-Encoding: chunked
Content-Type: text/plain; charset=iso-8859-1
Connection: Keep-Alive

The software is already installed dozens of times, so i think it must be an issue in the customers system, my suspicion is the proxy between.

Most likely, the problem is caused by the usage of HTTP/1.0 in this case. Chunked transfer and Keep-Alive are not standard in HTTP/1.0.

In chunked transfer encoding, each chunk should start with a hexadecimal number indicating the size of the chunk that follows. Obviously that number is not present here: Illegal chunked encoding. 'MIME-Version: 1.0' is not a hexadecimal number.

In HTTP/1.0, Keep-Alive and chunked transfer-coding cannot be used together:

An HTTP/1.1 server may also establish persistent connections with HTTP/1.0 clients upon receipt of a Keep-Alive connection token. However, a persistent connection with an HTTP/1.0 client cannot make use of the chunked transfer-coding, and therefore MUST use a Content-Length for marking the ending boundary of each message.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!