我在 http 请求中收到请求 header “内容编码:gzip,br”,因此内容编码 header 中有多个值。这些值的顺序是告诉我对请求正文进行压缩的顺序,还是告诉我们需要应用解压缩来解压缩请求正文的顺序?有人可以建议一下吗?
最佳答案
来自RFC 9110 :
If one or more encodings have been applied to a representation, the sender that applied the encodings MUST generate a Content-Encoding header field that lists the content codings in the order in which they were applied.
换句话说,您需要按照与 header 中的顺序相反的顺序进行解码。
关于java - http 请求中内容编码 header 中多个值的排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76149091/