[Webkit-unassigned] [Bug 140214] New: WKNavigation.initialRequest is always nil in -[WKNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 7 14:40:03 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=140214

            Bug ID: 140214
           Summary: WKNavigation.initialRequest is always nil in
                    -[WKNavigationDelegate
                    webView:didReceiveServerRedirectForProvisionalNavigati
                    on:]
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: iOS
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit2
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: eugenebut at chromium.org

Summary:
The initialRequest property of the WKNavigation object passed to -[WKNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:] is always nil. I expected this to be in the request 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.initialRequest);
}


Expected Results:
Expected WKNavigation.initialRequest to be populated with http://browsingtest.appspot.com/redirect?code=301 - the same request passed to -webView:decidePolicyForNavigationAction:decisionHandler: and -webView:didStartProvisionalNavigation:. 

Actual Results:
WKNavigation.initialRequest is nil
The method is not implemented: https://github.com/WebKit/webkit/blob/0190dd5b8c0272beaa705dbc10863a84a3e6af5e/Source/WebKit2/UIProcess/API/Cocoa/WKNavigation.mm

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150107/d53565b1/attachment-0002.html>


More information about the webkit-unassigned mailing list