Response Header "Content-Encoding" Doubled On Postback (IE8 Bug)

4 posts, 0 answers
  1. Paul Herzberg
    Paul Herzberg avatar
    20 posts
    Member since:
    Jun 2010

    Posted 24 Jan 2013 Link to this post

    Hello,

    I have a search function on every page. The way this works is that a button is pressed the Master page catches the button press and then redirects to a "suche.aspx" page.

    On updating the Telerik dll this has stopped working in IE8. IE8 tries to download a file.

    What I think causes the problem is at some point an extra "Response header" is added, "Content-encoding: gzip", so that there are now two, which confuses the browser (but not IE9 or Firefox -- FF renders the header as "Content-encoding: gzip, gzip" but accepts it).

    The answer seems to be to use Response.ClearHeaders() before the redirect (or turning off postback compression, which worked when this problem was confined to a couple of pages and I could use the "excludeHandler" for those) .

    I am hesitant, however, as a previous DLL required the removing of Response.ClearHeaders() for IE8 to work and I thought it best to get clarification as to the best practice here.

    Thank you

    Paul Herzberg
  2. Martin
    Admin
    Martin avatar
    811 posts

    Posted 29 Jan 2013 Link to this post

    Hello Paul Herzberg,

    If you download a compressed file and RadCompression is not disabled for the handler in question, it is very likely that the browser gets confused because of the second compression header being added to the response. I would suggest that you manually exclude from compression the handlers used for file downloading files. The other option is to use only regular postbacks to download files and stop the Postback compression feature of RadCompression.

    I hope this helps.

    Regards,
    Martin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Paul Herzberg
    Paul Herzberg avatar
    20 posts
    Member since:
    Jun 2010

    Posted 30 Jan 2013 Link to this post

    Hello Martin,

    That's not quite it. I think I must not have expressed myself clearly.

    When enablePostbackCompression is set to true if you redirect to another aspx file (eg. Response.Redirect(ResolveUrl("~/Start.aspx"))) from a postback then the Response header has a double entry which confuses IE8.

    This behaviour was introduced with the last Dll (2012.3.1205).

    I can turn off Postback Compression and, as stated, I can clear the headers before the redirect.

    The thing that worries me about the second solution is that it "response.clearheaders" was added in a previous version to fix something and then the line was removed because it caused a similar problem to the one described above (no headers confused IE8) and now I am putting it back again.

    What I would like to know is: Am I doing something wrong? Or is this seen as a bug?

    Thank you

    Paul

     


  5. Martin
    Admin
    Martin avatar
    811 posts

    Posted 31 Jan 2013 Link to this post

    Hello Paul,

    Thank you for the additional details. I was able to replicate the double content-encoding header issue on my side and indeed it looks to be RadCompression code related. The good news is that our developers managed to isolate the issue and implement a workaround for it. Just for testing purposes I am attaching a Trial version of the controls (targeting .NET40) that includes the fix in question. Please give it a try and let me know whether the problem still exists.

    Greetings,
    Martin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top