Latest Safari both on iPhone and Mac seem to have an issue with following redirects to urls where the domain is non-punycoded (i.e. using international characters). When same url is pasted into the address bar the dns resolves correctly.
To reproduce, you'd generally need a redirector - it's hard to find one that wouldn't automatically punycode the urls.
I've created a 302 redirect on a cloud machine (redirects to russian domain кто.рф). This does not work on iPhone's Safari and Chrome (works in Google Search App). Works fine on my desktop machine (unix, chrome) and using wget command. On Mac, it doesn't work on Safari, but works in Chrome. So seems like a webkit issue.
Test url: http://126.96.36.199/punycodetest.php - I'll take this down in a few days.
$ curl -i http://188.8.131.52/punycodetest.php
HTTP/1.1 302 Moved Temporarily
Date: Tue, 16 Aug 2016 05:44:07 GMT
Content-Type: text/html; charset=UTF-8
Reproduced with shipping Safari on OS X 10.10.5.
The Location field is UTF-8 encoded. I suspect that CFNetwork doesn't support that (and I'm not sure if there is anything spec-like that allows for non-ASCII in HTTP response headers).
Seems more like a WebKit issue than a CFNetwork one, because the error page in Safari shows the URL correctly decoded.
Thanks for taking a look! Is "Page Loading" still the right component?
Probably either this or Platform, depending on where the issue ends up being. It doesn't matter very much once the right people are CC'ed.
I just verified the following, which leads me to believe that it was something that was fixed in CFNetwork for iOS10 and Sierra.
Works correctly, opening http://кто.рф/eng
MacOS Sierra, Safari using NSURLSession
MacOS Sierra, Safari using NSURLConnection
iOS10, MobileSafari using NSURLSession
Works incorrectly, opening "Safari Can't Find the server"
OSX El Capitan, Shipping Safari
OSX El Capitan, latest build of WebKit/Safari using NSURLConnection
OSX El Capitan, latest build of WebKit/Safari using NSURLSession
iOS8, MobileSafari using CFURLConnection
iOS9, MobileSafari using CFURLConnection
We did fix https://bugs.webkit.org/show_bug.cgi?id=158371 recently although I don't think setHost is involved in HTTP redirects.
Thanks! I did also find that iOS beta does not have this issue.
Probably ok to close this issue unless you want to spend more time looking for culprit.
Fixed, probably by CFNetwork.
Thanks for reporting! Reports like this often yield improvements in ways we may have overlooked