Reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2006 05:58:20 +0000 (05:58 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Mar 2006 05:58:20 +0000 (05:58 +0000)
        - http://bugzilla.opendarwin.org/show_bug.cgi?id=7540
          REGRESSION: frequent cache-related crashes

        - http://bugzilla.opendarwin.org/show_bug.cgi?id=7393
          A stale comment about XMLHttpRequest responses being never cached

        * WebCoreSupport/WebFrameBridge.m: Don't call setHTTPHeader if the method is GET.
        (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
        * WebCoreSupport/WebSubresourceLoader.m: Ditto. Also removed a stale comment about
        XMLHTTPRequests.
        (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
        (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13084 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebCoreSupport/WebFrameBridge.m
WebKit/WebCoreSupport/WebSubresourceLoader.m

index 282728f589f0277115933d14716c8ba360f02f84..55562e10098a0453cb0e0933e8743ee0143b3525 100644 (file)
@@ -1,3 +1,20 @@
+2006-03-02  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Darin.
+
+        - http://bugzilla.opendarwin.org/show_bug.cgi?id=7540
+          REGRESSION: frequent cache-related crashes
+
+        - http://bugzilla.opendarwin.org/show_bug.cgi?id=7393
+          A stale comment about XMLHttpRequest responses being never cached
+
+        * WebCoreSupport/WebFrameBridge.m: Don't call setHTTPHeader if the method is GET.
+        (-[WebFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
+        * WebCoreSupport/WebSubresourceLoader.m: Ditto. Also removed a stale comment about
+        XMLHTTPRequests.
+        (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:referrer:forDataSource:]):
+        (+[WebSubresourceLoader startLoadingResource:withMethod:URL:customHeaders:postData:referrer:forDataSource:]):
+
 2006-02-23  David Harrison  <harrison@apple.com>
 
         Reviewed by Justin.
index 10ef2f79e35325e9583965a6f68509e7286e2ca5..062e5666eef7944567c9bb182075b8fbd62c04b9 100644 (file)
@@ -540,7 +540,10 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
     NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:URL];
     [request setTimeoutInterval:10];
 
-    [request setHTTPMethod:method];
+    // setHTTPMethod is not called for GET requests to work aroound <rdar://4464032>.
+    if (![method isEqualToString:@"GET"])
+        [request setHTTPMethod:method];
+
     if (postData)        
         webSetHTTPBody(request, postData);
 
@@ -550,7 +553,6 @@ NSString *WebPluginContainerKey =   @"WebPluginContainer";
         [request addValue:[requestHeaders objectForKey:key] forHTTPHeaderField:key];
     }
     
-    // Never use cached data for these requests (xmlhttprequests).
     [request setCachePolicy:[[[self dataSource] request] cachePolicy]];
     if (!hideReferrer)
         [request _web_setHTTPReferrer:[self referrer]];
index 044e0bff419215557f4ef50f50e3a253b67e9cdf..b5f61714fef95917b9d13e1310812484a8365c57 100644 (file)
                                  forDataSource:(WebDataSource *)source
 {
     NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
-    [newRequest setHTTPMethod:method];
+
+    // setHTTPMethod is not called for GET requests to work aroound <rdar://4464032>.
+    if (![method isEqualToString:@"GET"])
+        [newRequest setHTTPMethod:method];
 
     WebSubresourceLoader *loader = [self startLoadingResource:rLoader withRequest:newRequest customHeaders:customHeaders referrer:referrer forDataSource:source];
     [newRequest release];
 {
     NSMutableURLRequest *newRequest = [[NSMutableURLRequest alloc] initWithURL:URL];
 
-    [newRequest setHTTPMethod:method];
+    // setHTTPMethod is not called for GET requests to work aroound <rdar://4464032>.
+    if (![method isEqualToString:@"GET"])
+        [newRequest setHTTPMethod:method];
+
     webSetHTTPBody(newRequest, postData);
 
     WebSubresourceLoader *loader = [self startLoadingResource:rLoader withRequest:newRequest customHeaders:customHeaders referrer:referrer forDataSource:source];