SixOThree
SixOThree

Reputation: 771

Prevent server from encoding in gzip when downloading with WebClient

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?

Upvotes: 2

Views: 798

Answers (1)

Robert Harvey
Robert Harvey

Reputation: 180808

See this Jeff Atwood post for the solution:

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

Upvotes: 2

Related Questions