Commit a91ff068 authored by ap's avatar ap
Browse files

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:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 37cdbcbc
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.
......
......@@ -540,7 +540,10 @@ - (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL custo
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 @@ - (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL custo
[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]];
......
......@@ -106,7 +106,10 @@ + (WebSubresourceLoader *)startLoadingResource:(id <WebCoreResourceLoader>)rLoad
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];
......@@ -124,7 +127,10 @@ + (WebSubresourceLoader *)startLoadingResource:(id <WebCoreResourceLoader>)rLoad
{
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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment