没有压缩传输编码的微型网络服务器
Tiny web server without compressed transfer encoding
我正在使用具有 TCP 支持的非常受限的设备,我想支持 HTTP/1.1 但取消所有压缩支持以使其符合设备限制。
如果客户端发送压缩传输编码,服务器应返回哪个 HTTP 响应状态以指示它只接受非压缩块?
A server that receives a request message with a transfer coding it does not understand SHOULD respond with 501 (Not Implemented).
内容编码请参考RFC 7231, section 3.1.2.1:
An origin server MAY respond with a status code of 415 (Unsupported Media Type) if a representation in the request message has a content coding that is not acceptable.
我正在使用具有 TCP 支持的非常受限的设备,我想支持 HTTP/1.1 但取消所有压缩支持以使其符合设备限制。
如果客户端发送压缩传输编码,服务器应返回哪个 HTTP 响应状态以指示它只接受非压缩块?
A server that receives a request message with a transfer coding it does not understand SHOULD respond with 501 (Not Implemented).
内容编码请参考RFC 7231, section 3.1.2.1:
An origin server MAY respond with a status code of 415 (Unsupported Media Type) if a representation in the request message has a content coding that is not acceptable.