[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:58:36 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 76ee1a37bdcb2dc2106d5addf1ae56e203284050
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 10 22:33:31 2002 +0000

    WebFoundation:
    
    	Made WebCacheObject and WebResourceResponse methods that refer to specific dates set and return NSDates rather than NSTimeIntervals. Our public methods now only use NSTimeIntervals when referring to differences in time. Made the methods that use NSTimeIntervals when referring to specific dates private.
    
            * CacheLoader.subproj/WebCacheObject.h:
            * CacheLoader.subproj/WebCacheObject.m:
            (-[WebCacheObject createdDate]):
            (-[WebCacheObject setCreatedDate:]):
            (-[WebCacheObject expiresDate]):
            (-[WebCacheObject setExpiresDate:]):
            (-[WebCacheObject lastModifiedDate]):
            (-[WebCacheObject setLastModifiedDate:]):
            (-[WebCacheObject maxAgeValue]):
            (-[WebCacheObject isExpired]):
            (-[WebCacheObject age]):
            (-[WebCacheObject freshnessLifetime]):
            (-[WebCacheObject dealloc]):
            (-[WebCacheObject _createdTime]):
            (-[WebCacheObject _setCreatedTime:]):
            (-[WebCacheObject _expiresTime]):
            (-[WebCacheObject _setExpiresTime:]):
            (-[WebCacheObject _lastModifiedTime]):
            (-[WebCacheObject _setLastModifiedTime:]):
            * CacheLoader.subproj/WebCacheObjectPrivate.h: Added.
            * CacheLoader.subproj/WebResourceResponse.h:
            * CacheLoader.subproj/WebResourceResponse.m:
            (-[WebResourceResponse createdDate]):
            (-[WebResourceResponse lastModifiedDate]):
            (-[WebResourceResponse _createdTime]):
            (-[WebResourceResponse _lastModifiedTime]):
            (-[WebResourceResponse _takePersistentValuesFrom:]):
            * CacheLoader.subproj/WebResourceResponsePrivate.h:
            * ProtocolHandlers.subproj/WebCFNetworkHTTPProtocolHandler.m:
            (-[WebCFNetworkHTTPProtocolHandler addIfModifiedSinceHeader:]):
            (-[WebCFNetworkHTTPProtocolHandler continueHeaderReadAfter3xxResponseAndCall:]):
            * ProtocolHandlers.subproj/WebHTTPProtocolHandler.m:
            (-[WebHTTPProtocolHandler willCacheObject:]):
            * ProtocolHandlers.subproj/WebSimpleHTTPProtocolHandler.m:
            (-[WebSimpleHTTPProtocolHandler _createHTTPRequest]):
            (-[WebSimpleHTTPProtocolHandler _examineHeaders]):
            * WebFoundation.pbproj/project.pbxproj:
    
    WebKit:
    
    	Fixed: 3021681 - downloaded files' creation and modification dates are not set
    
            * Downloads.subproj/WebDownloadHandler.m:
            (-[WebDownloadHandler createFileIfNecessary]): call [response creationDate] and [response lastModifiedDate] when setting file attributes.
            * Plugins.subproj/WebBaseNetscapePluginStream.m:
            (-[WebBaseNetscapePluginStream setResponse:]): call [response lastModifiedDate] when giving content to plug-ins.
    
    WebBrowser:
    
    	Possible fix for: 3096071 - Button under "Proxy settings" in preferences window needs implementation
    
    	With the new Network Pref root, the proxy button seems to work %50 of the time. 3096071 may be fixed if the current problem is just a bug in the network pref.
    
            * Preferences.subproj/GeneralPreferences.m:
            (-[GeneralPreferences _launchNetworkPrefs]): code from Robert Ulrich
            (-[GeneralPreferences openProxyPreferences:]): call _launchNetworkPrefs
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2617 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index d8035d7..5379e50 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2002-11-10  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: 3021681 - downloaded files' creation and modification dates are not set
+
+        * Downloads.subproj/WebDownloadHandler.m:
+        (-[WebDownloadHandler createFileIfNecessary]): call [response creationDate] and [response lastModifiedDate] when setting file attributes.
+        * Plugins.subproj/WebBaseNetscapePluginStream.m:
+        (-[WebBaseNetscapePluginStream setResponse:]): call [response lastModifiedDate] when giving content to plug-ins.
+
 2002-11-10  Darin Adler  <darin at apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index d8035d7..5379e50 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2002-11-10  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: 3021681 - downloaded files' creation and modification dates are not set
+
+        * Downloads.subproj/WebDownloadHandler.m:
+        (-[WebDownloadHandler createFileIfNecessary]): call [response creationDate] and [response lastModifiedDate] when setting file attributes.
+        * Plugins.subproj/WebBaseNetscapePluginStream.m:
+        (-[WebBaseNetscapePluginStream setResponse:]): call [response lastModifiedDate] when giving content to plug-ins.
+
 2002-11-10  Darin Adler  <darin at apple.com>
 
         * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
diff --git a/WebKit/Downloads.subproj/WebDownload.m b/WebKit/Downloads.subproj/WebDownload.m
index 61faae1..37b52d6 100644
--- a/WebKit/Downloads.subproj/WebDownload.m
+++ b/WebKit/Downloads.subproj/WebDownload.m
@@ -18,6 +18,7 @@
 
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebResourceResponse.h>
 
 @implementation WebDownloadHandler
 
@@ -171,7 +172,15 @@
 
     [[dataSource contentPolicy] _setPath:path];
 
-    if (![fileManager createFileAtPath:path contents:nil attributes:[lastDecoder fileAttributes]]) {
+    NSDictionary *fileAttributes = [lastDecoder fileAttributes];
+    if(!fileAttributes){
+        WebResourceResponse *response = [dataSource response];
+        fileAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
+            [response createdDate], NSFileCreationDate,
+            [response lastModifiedDate], NSFileModificationDate, nil];
+    }
+    
+    if (![fileManager createFileAtPath:path contents:nil attributes:fileAttributes]) {
         ERROR("-[NSFileManager createFileAtPath:contents:attributes:] failed.");
         return [self errorWithCode:WebErrorCannotCreateFile];
     }
diff --git a/WebKit/Downloads.subproj/WebDownloadHandler.m b/WebKit/Downloads.subproj/WebDownloadHandler.m
index 61faae1..37b52d6 100644
--- a/WebKit/Downloads.subproj/WebDownloadHandler.m
+++ b/WebKit/Downloads.subproj/WebDownloadHandler.m
@@ -18,6 +18,7 @@
 
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebResourceResponse.h>
 
 @implementation WebDownloadHandler
 
@@ -171,7 +172,15 @@
 
     [[dataSource contentPolicy] _setPath:path];
 
-    if (![fileManager createFileAtPath:path contents:nil attributes:[lastDecoder fileAttributes]]) {
+    NSDictionary *fileAttributes = [lastDecoder fileAttributes];
+    if(!fileAttributes){
+        WebResourceResponse *response = [dataSource response];
+        fileAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
+            [response createdDate], NSFileCreationDate,
+            [response lastModifiedDate], NSFileModificationDate, nil];
+    }
+    
+    if (![fileManager createFileAtPath:path contents:nil attributes:fileAttributes]) {
         ERROR("-[NSFileManager createFileAtPath:contents:attributes:] failed.");
         return [self errorWithCode:WebErrorCannotCreateFile];
     }
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m
index 7547ab1..27215d0 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginStream.m
@@ -56,23 +56,10 @@
     char *cURL = (char *)malloc([URLString cStringLength]+1);
     [URLString getCString:cURL];
 
-    uint32 lastModified = 0;
-
-    if ([r isKindOfClass:[WebHTTPResourceResponse class]]) {
-        NSNumber *timeInterval = [[(WebHTTPResourceResponse *)r headers] objectForKey:@"Last-Modified"];
-        if(timeInterval) {
-            NSTimeInterval lastModifiedInterval;
-            lastModifiedInterval = [[NSDate dateWithTimeIntervalSinceReferenceDate:[timeInterval doubleValue]] timeIntervalSince1970];
-            if(lastModifiedInterval > 0){
-                lastModified = (uint32)lastModifiedInterval;
-            }
-        }
-    }
-
     stream.ndata = self;
     stream.URL = cURL;
     stream.end = [r contentLength];
-    stream.lastmodified = lastModified;
+    stream.lastmodified = [[r lastModifiedDate] timeIntervalSince1970];
     stream.notifyData = notifyData;
 
     // FIXME: Need a way to check if stream is seekable

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list