turbolinks / turbolinks-ios

Native iOS adapter for building hybrid apps with Turbolinks 5
MIT License
880 stars 92 forks source link

http 303 redirect ends up as NSError "A network error occurred." #163

Open tony42 opened 4 years ago

tony42 commented 4 years ago

One of our pages uses 303 redirect to an external site. That seems to work fine on Android. On iOS, we end up with an exception.

I did a bit of digging. I'm pretty sure the code ends up in WebView.swift in the WKScriptMessageHandler. The message.name is "VisitRequestFailed" and code is "0".

Ideal situation would be to preform the redirect, recognize the site is "external" and call Turbolinks.SessionDelegate.session(..., openExternalURL: )