This is a migrated thread and some comments may be shown as answers.

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

3 Answers 69 Views
Compression
This is a migrated thread and some comments may be shown as answers.
Paul Herzberg
Top achievements
Rank 1
Paul Herzberg asked on 24 Jan 2013, 01:07 PM
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

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 29 Jan 2013, 09:49 AM
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.
0
Paul Herzberg
Top achievements
Rank 1
answered on 30 Jan 2013, 09:39 AM
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

 


0
Martin
Telerik team
answered on 31 Jan 2013, 12:51 PM
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.
Tags
Compression
Asked by
Paul Herzberg
Top achievements
Rank 1
Answers by
Martin
Telerik team
Paul Herzberg
Top achievements
Rank 1
Share this question
or