当前位置: 技术问答>linux和unix
关于http请求中Accept-Encoding: gzip, deflate
来源: 互联网 发布时间:2017-02-22
本文导语: 我不想服务器给我返回的是gzip的编码格式, 所以我将get请求中 Accept-Encoding: gzip, deflate 改成了 Accept-Encoding: none 但是服务器还是给我返回了一个gzip的压缩编码,请问我该如何修改,服务器才会给我明文的数据,不会给我g...
我不想服务器给我返回的是gzip的编码格式,
所以我将get请求中 Accept-Encoding: gzip, deflate 改成了 Accept-Encoding: none
但是服务器还是给我返回了一个gzip的压缩编码,请问我该如何修改,服务器才会给我明文的数据,不会给我gzip的编码
|
RFC2616
设置为0,如果服务器返回的还是gzip的话,只能说web服务器不符合标准
A server tests whether a content-coding is acceptable, according to
an Accept-Encoding field, using these rules:
1. If the content-coding is one of the content-codings listed in
the Accept-Encoding field, then it is acceptable, unless it is
accompanied by a qvalue of 0. (As defined in section 3.9, a
qvalue of 0 means "not acceptable.")
2. The special "*" symbol in an Accept-Encoding field matches any
available content-coding not explicitly listed in the header
field.
3. If multiple content-codings are acceptable, then the acceptable
content-coding with the highest non-zero qvalue is preferred.
4. The "identity" content-coding is always acceptable, unless
specifically refused because the Accept-Encoding field includes
"identity;q=0", or because the field includes "*;q=0" and does
not explicitly include the "identity" content-coding. If the
Accept-Encoding field-value is empty, then only the "identity"
encoding is acceptable.
If no Accept-Encoding field is present in a request, the server MAY
assume that the client will accept any content coding.
设置为0,如果服务器返回的还是gzip的话,只能说web服务器不符合标准
|
服务端设置死了你也没办法,gzip/deflate又省带宽又快,多好啊。
|
你的客户端程序把http请求包头的Accept-Encoding: gzip, deflate 去掉。
|
好像都是这个返回!顺便学习下!