========================================
The source for the compression module is located here:
http://www.blowery.org/code/HttpCompressionModule.html
Note: Ben Lowery fiixed the code 4 months ago to work with Server.Transfer
and Response.Redirect.
I think my case is not part of his fix.
/// An HttpModule that hooks onto the Response.Filter property of the
/// current request and tries to compress the output, based on what
/// the browser supports.
///This module checks the Accept-Encoding HTTP header to determine if the
/// client actually supports any notion of compression. Currently, we
support
/// the deflate (zlib) and gzip compression schemes.
========================================
When I have it enabled in my web.config, the pages are sent to the browser
in compressed form.
But the module must be sending the headers "early" in the process. When I
run into an unhandled error, I log it and clear it in Global.asax and then
re-direct to my custom error form. This re-direct is what causes the dreaded
"http headers have already been sent" error. I am using a Try catch block
around my re-direct in Global.asax in an attempt to "eat the error".
========================================
I tried the settings ClearHeaders or ClearContent. But it did not stop the
error from occurring.
========================================
In Global.asax I have this: (remember, I was trying to load a page and got
an unhandled error)
========================================
'log error here. Then:
Server.ClearError()
'JF 8/9/2004 - See if this will prevent the error for "Server cannot append
header after HTTP headers have been sent." Nope.
Response.ClearContent()
Response.ClearHeaders()
Dim strErrorMessage As String = "We're sorry, but an unhandled error
occurred on the server. The Server Administrator has been notified and the
error logged."
Try
'this shared method sets some variables and then re-directs to my
standard error page.
MyUtilClass.DisplayErrorMessage("Application Error", strErrorMessage)
Catch except As Exception
'do nothing
End Try
========================================
Thanks for any advice.