1HTTP Pipelining with libcurl
2============================
3
4Background
5
6Since pipelining implies that one or more requests are sent to a server before
7the previous response(s) have been received, we only support it for multi
8interface use.
9
10Considerations
11
12When using the multi interface, you create one easy handle for each transfer.
13Bascially any number of handles can be created, added and used with the multi
14interface - simultaneously. It is an interface designed to allow many
15simultaneous transfers while still using a single thread. Pipelining does not
16change any of these details.
17
18API
19
20We've added a new option to curl_multi_setopt() called CURLMOPT_PIPELINING
21that enables "attempted pipelining" and then all easy handles used on that
22handle will attempt to use an existing pipeline.
23
24Details
25
26- A pipeline is only created if a previous connection exists to the same IP
27  address that the new request is being made to use.
28
29- Pipelines are only supported for HTTP(S) as no other currently supported
30  protocol has features resemembling this, but we still name this feature
31  plain 'pipelining' to possibly one day support it for other protocols as
32  well.
33
34- HTTP Pipelining is for GET and HEAD requests only.
35
36- When a pipeline is in use, we must take precautions so that when used easy
37  handles (i.e those who still wait for a response) are removed from the multi
38  handle, we must deal with the outstanding response nicely.
39
40- Explicitly asking for pipelining handle X and handle Y won't be supported.
41  It isn't easy for an app to do this association. The lib should probably
42  still resolve the second one properly to make sure that they actually _can_
43  be considered for pipelining. Also, asking for explicit pipelining on handle
44  X may be tricky when handle X get a closed connection.
45
46- We need options to control max pipeline length, and probably how to behave
47  if we reach that limit. As was discussed on the list, it can probably be
48  made very complicated, so perhaps we can think of a way to pass all
49  variables involved to a callback and let the application decide how to act
50  in specific situations. Either way, these fancy options are only interesting
51  to work on when everything is working and we have working apps to test with.
52