[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 07:45:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 17114a37ad5d0230149500ce966cc71c3efa845f
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jun 19 17:12:19 2003 +0000

    	Fixed: <rdar://problem/3294803>: HTTP error sent as content instead of error to plug-ins
    
            Reviewed by john.
    
            * Plugins.subproj/WebNetscapePluginStream.m:
            (-[WebNetscapePluginConnectionDelegate connection:didReceiveResponse:]): if the response is an error, cancel the load, return a network error
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5be789b..a93b29d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2003-06-19  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3294803>: HTTP error sent as content instead of error to plug-ins
+
+        Reviewed by john.
+
+        * Plugins.subproj/WebNetscapePluginStream.m:
+        (-[WebNetscapePluginConnectionDelegate connection:didReceiveResponse:]): if the response is an error, cancel the load, return a network error
+
 === Safari-85.1 ===
 
 2003-06-15  Vicki Murley  <vicki at apple.com>
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginStream.m b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
index 148fdb8..606f491 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginStream.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginStream.m
@@ -10,8 +10,10 @@
 #import <WebKit/WebNetscapePluginEmbeddedView.h>
 #import <WebKit/WebViewPrivate.h>
 
-#import <Foundation/NSURLRequest.h>
+#import <Foundation/NSError_NSURLExtras.h>
 #import <Foundation/NSURLConnection.h>
+#import <Foundation/NSURLResponsePrivate.h>
+#import <Foundation/NSURLRequest.h>
 
 @interface WebNetscapePluginConnectionDelegate : WebBaseResourceHandleDelegate
 {
@@ -99,6 +101,14 @@
     [self retain]; 
     [stream setResponse:theResponse];
     [super connection:con didReceiveResponse:theResponse];
+    if ([theResponse isKindOfClass:[NSHTTPURLResponse class]] &&
+        [NSHTTPURLResponse isErrorStatusCode:[(NSHTTPURLResponse *)theResponse statusCode]]) {
+        [stream receivedError:NPRES_NETWORK_ERR];
+        NSError *error = [NSError _web_errorWithDomain:NSURLErrorDomain
+                                                  code:NSURLErrorFileDoesNotExist
+                                            failingURL:[[theResponse URL] absoluteString]];
+        [self cancelWithError:error];
+    }
     [self release];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list