Pipelining and Persistent Connection Questions
Pipelining and Persistent Connection Questions
- Subject: Pipelining and Persistent Connection Questions
- From: David Hoerl <email@hidden>
- Date: Mon, 15 Oct 2012 17:42:33 -0400
Currently focused on iPhone to Amazon CloudFront.net service, but asking
general questions for the future.
1) As I understand it, pipelining is only going to happen if the OS can
keep a TCP connection open. This feature requires a HTTP1.1 endpoint, or
a HTTP1.0 that accepts (and returns) the 'Connect: keep-alive' flag.
So if one does not know a priori what version the endpoint is using, is
it always a good practive to stuff the 'Connect: keep-alive' flag in the
header?
Will a HTTP1.1 server respond with it set in the reply?
If not it would appear there is no way of knowing from the response that
there will in fact be a persistent connection (getting a response from a
1.0 servers is the best it can be, no?)
2) Assuming there is a persistent connection, then does setting
'setHTTPShouldUsePipelining:YES' always result in pipelining getting
enabled, or is there some other exchange between iOS and the endpoint to
negotiate this feature?
If the answer is 'not always enabled', is there some means to determing
whether its being used or not?
3) What I'd dearly love are two flags in NSURLResponse that told me if
the connection was persistent and if pipelining was being used (assuming
these are not equivalent).
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden