HTTP客户端指示HTTP服务器禁用gzip响应的规范方法是什么? [英] What is the canonical method for an HTTP client to instruct an HTTP server to disable gzip responses?

查看:603
本文介绍了HTTP客户端指示HTTP服务器禁用gzip响应的规范方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这是一个简单的google搜索,但显然我错了。

I thought this was a simple google search, but apparently I'm wrong on that.

我看到你应该提供:

Accept-Encoding: gzip;q=0,deflate;q=0

。然而,文章建议它也注意到代理常规忽略该标题。此外,当我提供它到nginx,它仍然压缩响应消息体。

in the request headers. However, the article that suggested it also noted that proxies routinely ignore that header. Also, when I supplied it to nginx, it still compressed the response message body.

http://forgetmenotes.blogspot.ca/2009/05/how-to-disable-gzip-compression-in.html

那么,如何告诉web服务器在响应消息体上禁用压缩?

So, how do I tell a web server to disable compression on the response message body?

推荐答案

您希望编码完全停用吗?
然后在http请求标头中跳过Accept-Encoding标头本身。

您希望在http响应中不存在gzip压缩吗?
然后从http请求标头的值列表中跳过gzip。

Do you wish only gzip compression to be absent in the http response?
Then skip gzip from the values list in the http request header.

Do您希望优先考虑服务器支持的不同压缩技术?然后对Accept-Encoding http请求头中的每个值使用0和1之间的不同值,同时使用q参数。 (目前您使用的是冲突值,并且按重量= 0表示您不知道该如何管理,但您希望回应编码无论如何)

Do you wish to prioritize different compression techniques that servers support? then use different values between 0 and 1 along-with q argument for each value in the Accept-Encoding http request header. (Currently you are using conflicting value and indicating by weight=0 that you don't know how you'll manage, but you want response to be encoded anyhow)

这篇关于HTTP客户端指示HTTP服务器禁用gzip响应的规范方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆