[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:35:41 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ac92273a0c8b7fd99b97168fb85fe83f4320042b
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 30 20:08:25 2002 +0000
WebFoundation:
Begin to refactor WebFoundation in preparation for some planned API changes.
This change removes all WebResourceHandle subclasses, pushing the functionality
that was contained in those classes to the corresponding WebProtocolHandler
subclasses. To make this work, I also did a small amount of mime type cleanup, and
as a bonus, I (unintentionally) managed to fix these two bugs:
Radar 3034795 (README fiel displays as HTML even though it's plain text)
Radar 3035320 (iana.org character sets page displays as HTML even though it's MIME type text/plain)
Bonus! :-)
Removed:
* CacheLoader.subproj/WebAboutResource.h
* CacheLoader.subproj/WebAboutResource.m
* CacheLoader.subproj/WebFileResourceHandle.h
* CacheLoader.subproj/WebFileResourceHandle.m
* CacheLoader.subproj/WebHTTPResourceHandle.h
* CacheLoader.subproj/WebHTTPResourceHandle.m
WebKit:
* WebView.subproj/WebControllerPrivate.m:
(+[WebController _MIMETypeForFile:]): Small tweak to account for change
in behavior of a WebFoundation method upon which this method depends.
The WebFoundation now returns nil when it cannot find a suitable mime
type rather than returning a default. This function now checks for a nil
return value and sets @"application/octet-stream" in that case.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2318a66..78b2666 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-30 Ken Kocienda <kocienda at apple.com>
+
+ * WebView.subproj/WebControllerPrivate.m:
+ (+[WebController _MIMETypeForFile:]): Small tweak to account for change
+ in behavior of a WebFoundation method upon which this method depends.
+ The WebFoundation now returns nil when it cannot find a suitable mime
+ type rather than returning a default. This function now checks for a nil
+ return value and sets @"application/octet-stream" in that case.
+
2002-08-30 Richard Williamson (Home) <rjw at apple.com>
Change link dragging behavior. Drags URL, not URL contents.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 2318a66..78b2666 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-08-30 Ken Kocienda <kocienda at apple.com>
+
+ * WebView.subproj/WebControllerPrivate.m:
+ (+[WebController _MIMETypeForFile:]): Small tweak to account for change
+ in behavior of a WebFoundation method upon which this method depends.
+ The WebFoundation now returns nil when it cannot find a suitable mime
+ type rather than returning a default. This function now checks for a nil
+ return value and sets @"application/octet-stream" in that case.
+
2002-08-30 Richard Williamson (Home) <rjw at apple.com>
Change link dragging behavior. Drags URL, not URL contents.
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index ebe3194..be6c6e1 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -171,12 +171,22 @@
+ (NSString *)_MIMETypeForFile: (NSString *)path
{
+ NSString *result;
NSString *extension = [path pathExtension];
- if([extension isEqualToString:@""])
- return @"text/html";
-
- return [[WebFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
+ if ([extension isEqualToString:@""]) {
+ result = @"text/html";
+ }
+ else {
+ result = [[WebFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
+ if (result == nil) {
+ result = @"application/octet-stream";
+ }
+ }
+
+ NSLog(@"_MIMETypeForFile: %@ -> %@", path, result);
+
+ return result;
}
- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index ebe3194..be6c6e1 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -171,12 +171,22 @@
+ (NSString *)_MIMETypeForFile: (NSString *)path
{
+ NSString *result;
NSString *extension = [path pathExtension];
- if([extension isEqualToString:@""])
- return @"text/html";
-
- return [[WebFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
+ if ([extension isEqualToString:@""]) {
+ result = @"text/html";
+ }
+ else {
+ result = [[WebFileTypeMappings sharedMappings] MIMETypeForExtension:extension];
+ if (result == nil) {
+ result = @"application/octet-stream";
+ }
+ }
+
+ NSLog(@"_MIMETypeForFile: %@ -> %@", path, result);
+
+ return result;
}
- (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list