title: IIS 7.5 ASP.NET HttpModule - Setting Response.Filter results in chunked encoding
body: <p>I'm trying to create a HttpModule that changes the <code>Response.Filter</code> like so
  (for this demonstration just set the filter back to itself):</p>
  
  <pre><code>public class ContentTrafficMonitor : IHttpModule
  {
    public void Init( HttpApplication context )
    {
       context.BeginRequest += OnBeginRequest;
    }
  
    public void Dispose()
    {
    }
  
    private static void OnBeginRequest( object sender, EventArgs e )
    {
       var application = (HttpApplication) sender;
       application.Response.Filter = application.Response.Filter;
    }
  </code></pre>
  
  <p>}</p>
  
  <p>Doing so sets the transfer encoding of the response to chunked, rather than using the <code>Content-Length</code> header.</p>
  
  <p>If I remove the line where the <code>Response.Filter</code> is set, the response does have the <code>Content-Length</code> header. Our application depends on the <code>Content-Length</code> header, is there any way to prevent this behavior?</p>