WKURLSchemeTask fails to HTTP redirect
Originator: | garvankeeley | ||
Number: | rdar://46027205 | Date Originated: | |
Status: | Open | Resolved: | |
Product: | iOS + SDK (WebKit) | Product Version: | Xcode 10.1 |
Classification: | Bug | Reproducible: | Always |
In Firefox iOS we need our custom URL scheme to perform HTTP 3xx redirection. This webkit bug https://bugs.webkit.org/show_bug.cgi?id=173730 indicates that support for this was fixed in WebKit. Steps to Reproduce: With a custom URL scheme installed, use the following response in the WKURLSchemeHandler, which should redirect to google.com. func webView(_ webView: WKWebView, start urlSchemeTask: WKURLSchemeTask) { let resp = HTTPURLResponse(url: urlSchemeTask.request.url!, statusCode: 301, httpVersion: "HTTP/1.1", headerFields: ["Location": "https://www.google.com"])! urlSchemeTask.didReceive(resp) urlSchemeTask.didFinish() } Expected Results: Perform HTTP redirection to google.com Actual Results: Nothing happens
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!