Commit c12a0350 authored by darin's avatar darin
Browse files

WebCore:

        Reviewed by Ken.

	- fixed problem where Content-Type was coming in with suffixes like "charset"

        * kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers"
	parameter, from openURL method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the
	content type from a parameter, and the refresh header from a separate parameter rather
	than extracting both from a headers dictionary.

WebKit:

        Reviewed by Ken.

	- fixed problem where Content-Type was going into WebCore with suffixes like "charset"

        * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady:]):
	Pass in contentType from the response, rather than the "Content-Type" header.
	Also pass in the refresh header separately.

        * English.lproj/StringsNotToBeLocalized.txt: Updated for above change.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5c611c4d
2003-01-15 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed problem where Content-Type was coming in with suffixes like "charset"
* kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers"
parameter, from openURL method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the
content type from a parameter, and the refresh header from a separate parameter rather
than extracting both from a headers dictionary.
2003-01-14 Darin Adler <darin@apple.com> 2003-01-14 Darin Adler <darin@apple.com>
Reviewed by Maciej. Reviewed by Maciej.
......
2003-01-15 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed problem where Content-Type was coming in with suffixes like "charset"
* kwq/WebCoreBridge.h: Add contentType and refresh parameters, and remove "headers"
parameter, from openURL method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): Get the
content type from a parameter, and the refresh header from a separate parameter rather
than extracting both from a headers dictionary.
2003-01-14 Darin Adler <darin@apple.com> 2003-01-14 Darin Adler <darin@apple.com>
Reviewed by Maciej. Reviewed by Maciej.
......
...@@ -100,7 +100,9 @@ enum FrameBorderStyle { ...@@ -100,7 +100,9 @@ enum FrameBorderStyle {
- (void)setParent:(WebCoreBridge *)parent; - (void)setParent:(WebCoreBridge *)parent;
- (void)openURL:(NSString *)URL reload:(BOOL)reload headers:(NSDictionary *)headers lastModified:(NSDate *)lastModified pageCache:(NSDictionary *)pageCache; - (void)openURL:(NSString *)URL reload:(BOOL)reload
contentType:(NSString *)contentType refresh:(NSString *)refresh lastModified:(NSDate *)lastModified
pageCache:(NSDictionary *)pageCache;
- (void)addData:(NSData *)data withEncoding:(NSString *)encoding; - (void)addData:(NSData *)data withEncoding:(NSString *)encoding;
- (void)addData:(NSData *)data withOverrideEncoding:(NSString *)encoding; - (void)addData:(NSData *)data withOverrideEncoding:(NSString *)encoding;
- (void)closeURL; - (void)closeURL;
......
...@@ -138,7 +138,7 @@ static bool initializedObjectCacheSize = FALSE; ...@@ -138,7 +138,7 @@ static bool initializedObjectCacheSize = FALSE;
_part->setParent([parent part]); _part->setParent([parent part]);
} }
- (void)openURL:(NSString *)URL reload:(BOOL)reload headers:(NSDictionary *)headers lastModified:(NSDate *)lastModified pageCache:(NSDictionary *)pageCache - (void)openURL:(NSString *)URL reload:(BOOL)reload contentType:(NSString *)contentType refresh:(NSString *)refresh lastModified:(NSDate *)lastModified pageCache:(NSDictionary *)pageCache
{ {
if (pageCache) { if (pageCache) {
KWQPageState *state = [pageCache objectForKey:@"WebCorePageState"]; KWQPageState *state = [pageCache objectForKey:@"WebCorePageState"];
...@@ -150,7 +150,6 @@ static bool initializedObjectCacheSize = FALSE; ...@@ -150,7 +150,6 @@ static bool initializedObjectCacheSize = FALSE;
// arguments // arguments
URLArgs args(_part->browserExtension()->urlArgs()); URLArgs args(_part->browserExtension()->urlArgs());
args.reload = reload; args.reload = reload;
NSString *contentType = [headers objectForKey:@"Content-Type"];
if (contentType) { if (contentType) {
args.serviceType = QString::fromNSString(contentType); args.serviceType = QString::fromNSString(contentType);
} }
...@@ -160,9 +159,8 @@ static bool initializedObjectCacheSize = FALSE; ...@@ -160,9 +159,8 @@ static bool initializedObjectCacheSize = FALSE;
_part->didOpenURL([URL cString]); _part->didOpenURL([URL cString]);
// things we have to set up after calling didOpenURL // things we have to set up after calling didOpenURL
NSString *refreshHeader = [headers objectForKey:@"Refresh"]; if (refresh) {
if (refreshHeader) { _part->addMetaData("http-refresh", QString::fromNSString(refresh));
_part->addMetaData("http-refresh", QString::fromNSString(refreshHeader));
} }
if (lastModified) { if (lastModified) {
_part->addMetaData("modified", QString::fromNSString([lastModified description])); _part->addMetaData("modified", QString::fromNSString([lastModified description]));
......
2003-01-15 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed problem where Content-Type was going into WebCore with suffixes like "charset"
* WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _commitIfReady:]):
Pass in contentType from the response, rather than the "Content-Type" header.
Also pass in the refresh header separately.
* English.lproj/StringsNotToBeLocalized.txt: Updated for above change.
2003-01-13 Maciej Stachowiak <mjs@apple.com> 2003-01-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin, Dave and Trey, and given the seal of approval by Don. Reviewed by Darin, Dave and Trey, and given the seal of approval by Don.
......
...@@ -251,5 +251,6 @@ WebCoreSupport.subproj/WebBridge.m:"height" ...@@ -251,5 +251,6 @@ WebCoreSupport.subproj/WebBridge.m:"height"
WebCoreSupport.subproj/WebBridge.m:"width" WebCoreSupport.subproj/WebBridge.m:"width"
WebCoreSupport.subproj/WebCookieAdapter.m:"Cookie" WebCoreSupport.subproj/WebCookieAdapter.m:"Cookie"
WebCoreSupport.subproj/WebTextRenderer.m:"YES" WebCoreSupport.subproj/WebTextRenderer.m:"YES"
WebView.subproj/WebDataSourcePrivate.m:"Refresh"
WebView.subproj/WebPreferences.m:"latin1" WebView.subproj/WebPreferences.m:"latin1"
WebView.subproj/WebRenderNode.m WebView.subproj/WebRenderNode.m
...@@ -481,10 +481,11 @@ -(void)_commitIfReady: (NSDictionary *)pageCache ...@@ -481,10 +481,11 @@ -(void)_commitIfReady: (NSDictionary *)pageCache
} }
[[self _bridge] openURL:urlString [[self _bridge] openURL:urlString
reload:reload reload:reload
headers:headers contentType:[_private->response contentType]
lastModified: (pageCache ? nil : [_private->response lastModifiedDate]) refresh:[headers objectForKey:@"Refresh"]
pageCache: pageCache]; lastModified:(pageCache ? nil : [_private->response lastModifiedDate])
pageCache:pageCache];
[[self webFrame] _opened]; [[self webFrame] _opened];
} }
......
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