Hopefully actually fixing 246469: it seems that while Cocoa documents its use of gzip as having the MIME type "application/gzip", it actually uses (what it's supposed to) "application/x-gzip".

This commit is contained in:
Andy Matuschak committed 2008-07-21 20:55:04 -07:00
1 parent 7b212ea7fd
commit 0af86bbb9d
1 file changed
+3 -2
+3 -2
View File
@@ -163,8 +163,9 @@
- (BOOL)download:(NSURLDownload *)download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType
{
if ([encodingType isEqualToString:@"application/gzip"]) return NO;
return YES;
// We don't want the download system to extract our gzips.
// Note that we use a substring matching here instead of direct comparison because the docs say "application/gzip" but the system *uses* "application/x-gzip". This is a documentation bug.
return ([encodingType rangeOfString:@"gzip"].origin == NSNotFound);
}
- (void)extractUpdate