Safari (iPhone, MacBook) gives NSURLErrorDomain:-1017
I face the issue that Safari returns the error: cannot parse response (NSURLErrorDomain:-1017)
I tested it on different iPhones and one MacBook.
iPhone XS & 11 (iOS 14.3). MacBook Pro BigSur.
Google Chrome does not have this issue!
Solution 1:
What are you using to host the website? The issue is because of:
It looks like your server is offering an upgrade to HTTP/2 even though the connection is already done with HTTP/2 - which makes no sense. Not only that, it is explicitly forbidden. From RFC 7540 section 8.1.2.2:
I had a similar issue with a .NET API which was breaking only with Safari/iOS and the solution was pretty similar to HTTP/2 configuration
Please check here: https://serverfault.com/questions/937253/https-doesnt-work-with-safari
Nginx: Header unset Upgrade; does not work if you proxy your request, use proxy_hide_header Upgrade; instead.