views:

176

answers:

1

I have a download manager of sorts that uses WebClient.DownloadFileAsync. Webclient doesn't seem to handle gzip encoding and some servers are insisting on using it. Since almost all of the files this will be downloading are already compressed, it would be nice just to be able to force it to stop.

I've tried setting the Accept-Encoding to nothing but servers still keep sending gzip. Is it possible to disable or will I have to resort to checking responseheaders?

+2  A: 

See this Jeff Atwood post for the solution:

http://www.codinghorror.com/blog/archives/000064.html

Robert Harvey
Okay, I used the SharpZipLib as suggested there, but since I'm using downloadasync I have to decode after the fact. So I just rename the file, decode it, then delete the original. Not pretty but it seems to work.Thanks for the link.
SixOThree