Reputation: 6756
I am confused about HTTP BOSH and HTTP Pipelining.
BOSH spec: http://xmpp.org/extensions/xep-0124.html
If the client needs to send some data to the connection manager then it simply sends a second request containing the data. Unfortunately most constrained clients do not support HTTP Pipelining (concurrent requests over a single connection), so the client typically needs to send the data over a second HTTP connection.
And in this specification is many info about HTTP pipelining, but from http://en.wikipedia.org/wiki/HTTP_pipelining
Non-idempotent methods like POST should not be pipelined.
And in BOSH spec:
All information is encoded in the body of standard HTTP POST requests and responses. Each HTTP body contains a single wrapper which encapsulates the XML elements being transferred (see Wrapper Element).
So how can be HTTP pipelining used with HTTP BOSH??
Upvotes: 2
Views: 468
Reputation: 41287
The HTTP RFC says
Clients SHOULD NOT pipeline requests using non-idempotent methods or non-idempotent sequences of methods (see section 9.1.2).
"SHOULD NOT" in this context has the meaning given by RFC 2119, namely,
This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label
What this means is that, in general, it is not recommended to use HTTP pipelining in conjunction with POST
requests (this being in line with RFC 2616's notion of POST
); however, the HTTP protocol does not actually forbid it. If it actually forbade the behavior, RFC 2616 would use the language "MUST NOT". The author's of the BOSH
spec made a judgement that, in the case of BOSH
there are no adverse effects to pipelining POST
requests.
Upvotes: 6