Prevent server from gzip encoding when uploading with WebClient

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

I tried setting Accept-Encoding to nothing, but the servers still keep sending gzip. Can I disable or will I have to resort to checking the responders?

+2


source to share


1 answer


See this post by Jeff Atwood for a solution:



http://www.codinghorror.com/blog/2004/08/netwebclient-and-gzip.html

+2


source







All Articles