1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-01 09:51:46 -05:00
Daniel Stenberg da58d03ff7 Venkat Akella found out that libcurl did not like HTTP responses that simply
responded with a single status line and no headers nor body. Starting now, a
HTTP response on a persistent connection (i.e not set to be closed after the
response has been taken care of) must have Content-Length or chunked
encoding set, or libcurl will simply assume that there is no body.

To my horror I learned that we had no less than 57(!) test cases that did bad
HTTP responses like this, and even the test http server (sws) responded badly
when queried by the test system if it is the test system. So although the
actual fix for the problem was tiny, going through all the newly failing test
cases got really painful and boring.
2006-11-25 13:32:04 +00:00
..
2004-08-10 10:43:41 +00:00
2002-06-14 09:36:09 +00:00
2006-09-25 00:54:32 +00:00
2004-01-07 09:19:33 +00:00
2006-09-08 05:18:07 +00:00
2006-10-25 07:19:45 +00:00
2006-03-04 22:39:31 +00:00
2006-01-26 10:39:25 +00:00
2005-07-05 18:07:55 +00:00
2006-10-25 07:19:45 +00:00
2005-04-07 21:10:31 +00:00
2005-05-02 14:33:07 +00:00
2004-12-15 01:38:25 +00:00
2005-05-02 14:33:07 +00:00
2004-01-07 09:19:33 +00:00
2004-06-10 21:20:15 +00:00
2004-04-30 08:51:19 +00:00
2005-01-14 13:43:29 +00:00
2006-10-29 09:18:32 +00:00
2006-10-29 09:11:44 +00:00
2005-11-12 22:13:20 +00:00
2006-10-27 02:18:29 +00:00
2006-09-23 19:09:39 +00:00
2006-07-15 18:57:51 +00:00
2006-11-11 22:05:33 +00:00
2006-07-17 15:25:37 +00:00
2005-04-22 20:48:07 +00:00
2004-10-11 17:26:24 +00:00
2004-01-07 09:19:33 +00:00
2004-12-17 18:33:09 +00:00
2006-10-21 12:36:10 +00:00
2006-11-25 01:02:52 +00:00

HTTP Pipelining with libcurl
============================

Background

Since pipelining implies that one or more requests are sent to a server before
the previous response(s) have been received, we only support it for multi
interface use.

Considerations

When using the multi interface, you create one easy handle for each transfer.
Bascially any number of handles can be created, added and used with the multi
interface - simultaneously. It is an interface designed to allow many
simultaneous transfers while still using a single thread. Pipelining does not
change any of these details.

API

We've added a new option to curl_multi_setopt() called CURLMOPT_PIPELINING
that enables "attempted pipelining" and then all easy handles used on that
handle will attempt to use an existing pipeline.

Details

- A pipeline is only created if a previous connection exists to the same IP
  address that the new request is being made to use.

- Pipelines are only supported for HTTP(S) as no other currently supported
  protocol has features resemembling this, but we still name this feature
  plain 'pipelining' to possibly one day support it for other protocols as
  well.

- HTTP Pipelining is for GET and HEAD requests only.

- When a pipeline is in use, we must take precautions so that when used easy
  handles (i.e those who still wait for a response) are removed from the multi
  handle, we must deal with the outstanding response nicely.

- Explicitly asking for pipelining handle X and handle Y won't be supported.
  It isn't easy for an app to do this association. The lib should probably
  still resolve the second one properly to make sure that they actually _can_
  be considered for pipelining. Also, asking for explicit pipelining on handle
  X may be tricky when handle X get a closed connection.

- We need options to control max pipeline length, and probably how to behave
  if we reach that limit. As was discussed on the list, it can probably be
  made very complicated, so perhaps we can think of a way to pass all
  variables involved to a callback and let the application decide how to act
  in specific situations. Either way, these fancy options are only interesting
  to work on when everything is working and we have working apps to test with.