Did you ever find a solution to this? I am having the same problem. If I
enable compression on our ISA server, it works fine. Just when using an
HTTPModule is when I have this problem. Very frustrating.
"Mike P2" wrote:
Quote:
Hi. To make page downloading quicker, I added GZipStream into the
Response filter. My (shortened VB) code snippet from Global.asax looks
like this:
............................................
>
Sub Application_BeginRequest(...)
>
If Request.RawUrl.Contains(".aspx") And _
Not Request.Headers("Accept-Encoding") Is Nothing Then
>
If Request.Headers("Accept-
encoding").ToLower().Contains("gzip") Then
>
Response.Filter = New GZipStream(Response.Filter,
CompressionMode.Compress, True)
Response.AppendHeader("Content-encoding", "gzip")
>
' Else...try deflate
>
End If
>
End If
>
End Sub
............................................
>
I added the check for .aspx in the request because it was messing up
images. Now that I'm using AJAX, it's giving me problems again. When
AJAX (I mean ASP's AJAX thing, but I'm not using Atlas) tries to
communicate with the server, it (JS) alert()s me that it could not
parse the server's response, and is probably because of a filter
(meaning this simple GZip stream).
>
How can I more efficiently check whether or not it is appropriate to
compress the output? And, by the way, is there a better way of
compressing output that won't mess up with images and could possibly
compress AJAX also?
>
-Mike PII
>
>