使用压缩动态内容时如何禁用分块传输编码?
我想在我的网络服务器上禁用分块传输编码,以避免此错误: http://support.microsoft.com/kb/871205 。 不幸的是,我需要在Win2k上支持IE6,所以他们无法安装补丁。
我找到了将 AspEnableChunkedEncoding 设置为 FALSE 的说明,但这似乎并不能解决我的问题。 我相信这是因为我们还使用 gzip 压缩,根据这篇文章 (http://www.eggheadcafe.com/conversation.aspx?messageid=31045986&threadid=31045970)需要分块编码才能压缩动态内容。 因此,所有动态压缩的内容都会被“分块”传输,因为它是由 gzip 过滤器而不是 ASP.NET 压缩的。
我知道 IIS 可以不分块地提供此内容,因为我尝试在请求中使用 http 1.0(不支持传输编码:分块),并且响应正确到达并被压缩。
使用 ScriptManager 时如何禁用分块编码,这需要对生成的“.axd”文件进行动态压缩?
I want to disable chunked transfer encoding on my web server, in order to avoid this bug:
http://support.microsoft.com/kb/871205 . Unfortunately, I need to support IE6 on Win2k, so they cannot install the patch.
I found instructions to set AspEnableChunkedEncoding to FALSE, but this does not seem to solve my problem. I believe this is because we also use gzip compression, which, according to this article (http://www.eggheadcafe.com/conversation.aspx?messageid=31045986&threadid=31045970) requires chunked encoding in order to compress dynamic content. Thus, all of the dynamically compressed content is transferred 'chunked', because it's compressed by the gzip filter, not ASP.NET.
I know that IIS can serve this content unchunked, because I've tried using http 1.0 in the request (which does not support transfer-encoding: chunked), and the response arrives correctly and compressed.
How do I disable chunked encoding when using a ScriptManager, which necessitates dynamic compression of the resultant ".axd" files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您无法更改 IIS 中 GZip 压缩的行为或让您的客户端升级到新操作系统,因此为什么不有条件地关闭特定用户代理字符串的 GZip 压缩。
在 Apache 上,您可以使用 mod rewrite 来执行此操作(请参阅此处< /a>),其中有一些行,例如:
此 服务器故障线程表示您可以使用ISAPI Rewrite来使用相同的指令并获得相同的结果结果。 看起来免费的“Lite”版本也支持这些指令,因此您无需购买任何许可证。
Since you can't change the behaviour of either the GZip compression in IIS or get your client to upgrade to a new OS, why not conditionally turn off GZip compression for specific user agent strings.
On Apache you could use mod rewrite to do this (see here) with some lines like:
This server fault thread indicates that you can use ISAPI Rewrite to use the same directives and get the same result. It looks like these directives would be supported by the free "Lite" version too, so you won't have to buy any licenses.