It is quite a simple question from me today. Is it possible to set specific HTTP protocol version to NSURLRequest object (1.0 or 1.1, for example)?
An example of what I’m talking about on telnet:
pavlov:~ pavlov$ telnet ya.ru 80
Trying 87.250.250.3...
Connected to ya.ru.
Escape character is '^]'.
GET /index.php HTTP/1.0
You cannot change the HTTP version of a
NSURLRequest. However you can use theCFNetworkframework. It’s the C framework on top of whichNSURLConnectionis based.The
CFHTTPMessageCreateRequestfunction creates a new message with an arbitrary HTTP protocol version. Then, that message may be used to create an input stream using theCFReadStreamCreateForHTTPRequestfunction.Documentation: CFNetwork – Communicating with HTTP Servers