代码改变世界

【备忘】ASP.NET 输出缓存导致 HttpModule 产生双重压缩

2011-01-13 16:31  Nana's Lich  阅读(347)  评论(0编辑  收藏  举报


http://forums.asp.net/p/1539558/3748425.aspx


...


The solution I happened upon was to hook into the pipeline later on (PreSendRequestHeaders or ReleaseRequestState rather than BeginRequest). This solution is implemented in the blowery compression module. I gave it a shot and suddenly things started working. I'm not sure why. Seems like the file should still be flowing through the compression module like it was in step #4 above and causing double compression, but maybe these two events (PreSendRequestHeaders and ReleaseRequestState) don't fire when the content is pulled from cache?


...