]> git.ipfire.org Git - thirdparty/squid.git/commit
- Replaced BodyReader with BodyPipe. BodyReader was a
authorrousskov <>
Fri, 6 Apr 2007 10:48:25 +0000 (10:48 +0000)
committerrousskov <>
Fri, 6 Apr 2007 10:48:25 +0000 (10:48 +0000)
commit1b39caaa84db70bcd40fff82d3f98bcaf1715e61
treeb5912d517d3abdc95edba22042687f1380a8b5f5
parent854d4d817b040cc16168e40fb23e344969d01422
- Replaced BodyReader with BodyPipe. BodyReader was a
  collection of function pointers augmented with body size
  calculation logic. BodyReader was used to deliver request
  body (of a known size) from the client side to the server
  side. Reference counting was used to communicate abort
  conditions to the other side (it did not work well because
  decreasing the reference count does not have any side-effects
  if the count remains positive). Direct calls between sides
  sometimes resulted in a call-me-when-I-am-calling-you "loops"
  and related bugs.

  BodyPipe is used to deliver request or response body (possibly
  of unknown size) from the body producer to the body consumer.
  A producer can be the client side (for virgin requests), the
  server side (for virgin replies), or the ICAP side (for
  adapted messages). A consumer can be the client side (for
  adapted responses, including responses in a request
  satisfaction mode), the server side (for adapted requests),
  and the ICAP side (for virgin requests and responses).

  BodyPipe uses asynchronous calls for communication between
  sides to avoid call-me-when-I-am-calling-you "loops".

  BodyPipe has methods to communicate normal termination and
  abort conditions to the other side. The use of those methods
  is mandatory. Reference counting is used only as a garbage
  collection mechanism.

  BodyPipe is used to read request bodies, including requests
  for which there is no consumer and the connection is in a
  'closing' state. BodyPipe can auto-consume body so that a
  'closing' connection does not have to rely on the body
  consumer presence when eating up remaining body data.

  If auto-consumption is turned on and the pipe starts
  consuming before a real consumer is attached to the pipe, the
  setConsumerIfNotLate call fails, and the real consumer has to
  handle the failure.

  The new BodyPipe approach should make support for HTTP/1.1
  chunked requests easier. Only a few places in the pipe-related
  code assume that the request size is known.

- Removed ClientBody as unused, replaced by BodyReader, then
  BodyPipe.
src/BodyPipe.cc [new file with mode: 0644]
src/BodyPipe.h [new file with mode: 0644]
src/BodyReader.cc [deleted file]
src/BodyReader.h [deleted file]
src/ClientBody.cc [deleted file]
src/ClientBody.h [deleted file]