WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
140213
WKNavigation.response is always nil in -[WKNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]
https://bugs.webkit.org/show_bug.cgi?id=140213
Summary
WKNavigation.response is always nil in -[WKNavigationDelegate webView:didRece...
Eugene But
Reported
2015-01-07 14:38:07 PST
Summary: The response property of the WKNavigation object passed to -[WKNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:] is always nil. I expected this to be the response that triggered the redirect. Steps to Reproduce: 1) Create a WKWebView instance and load browsingtest.appspot.com. 2) Click on "redirect301" from the page in the row "Window34". Sample Code: - (void)viewDidLoad { [super viewDidLoad]; WKWebViewConfiguration* config = [[WKWebViewConfiguration alloc] init]; self.webView = [[WKWebView alloc] initWithFrame:self.view.bounds configuration:config]; [self.view addSubview:self.webView]; self.webView.navigationDelegate = self; NSURLRequest* request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:@"
http://browsingtest.appspot.com
"]]; [self.webView loadRequest:request]; // click redirect301 on the page. } - (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation { // This should not be nil. NSLog(@"%@", navigation.response); } Expected Results: Expected WKNavigation.response to be populated with the response from
http://browsingtest.appspot.com/redirect?code=301
. Actual Results: WKNavigation.response is nil Hose methods are not implemented:
https://github.com/WebKit/webkit/blob/0190dd5b8c0272beaa705dbc10863a84a3e6af5e/Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.mm
Attachments
Add attachment
proposed patch, testcase, etc.
Eugene But
Comment 1
2015-01-07 16:09:14 PST
Radar ID: 17935346
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug