We have upgraded our server to HTTP2 with TLS1.2 recently. We find all other platforms were good except iOS. On iOS platform, requests based on NSURLSession result in random error : Error Domain=NSPOSIXErrorDomain Code=100 "Protocol error”.
We have already checked request’s header but it still can’t be fixed. The weirdest thing is that on the server side the request’s status code is 200.
Since HTTP1.1 with TLS1.2 works fine, I think it’s something wrong with HTTP2.
Can we have any hint for this error?
The weirdest thing is that on the server side the request’s status code is 200.
These values are not in the same namespace. The error you’re getting back from
NSURLSession has a domain of
NSPOSIXErrorDomain, meaning that it’s
<sys/errno.h>. It’s hard to say where this is coming from, but it has nothing to do with HTTP status codes.
Please grab a CFNetwork diagnostic log (per QA1887) and see if it offers any insight into the source of the error.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"