request.Proxy = this.Proxy;\r
request.CachePolicy = new System.Net.Cache.RequestCachePolicy(CacheLevel);\r
\r
+ HttpWebRequest httpRequest = request as HttpWebRequest;\r
+ if (httpRequest != null) {\r
+ httpRequest.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip; \r
+ }\r
+ \r
if (cancelCalled) {\r
throw new NaGetTaskCanceledException(string.Empty);\r
}\r
\r
// 更新日を補完\r
if (File.Exists(filepath)) {\r
- if (response is HttpWebResponse) {\r
- File.SetLastWriteTime(filepath, ((HttpWebResponse) response).LastModified);\r
- } else if (response is FtpWebResponse) {\r
- File.SetLastWriteTime(filepath, ((FtpWebResponse) response).LastModified);\r
+ HttpWebResponse httpResponse = response as HttpWebResponse;\r
+ FtpWebResponse ftpResponse = response as FtpWebResponse;\r
+ \r
+ if (httpResponse != null) {\r
+ File.SetLastWriteTime(filepath, httpResponse.LastModified);\r
+ } else if (ftpResponse != null) {\r
+ File.SetLastWriteTime(filepath, ftpResponse.LastModified);\r
}\r
}\r
} finally {\r