]> git.ipfire.org Git - thirdparty/squid.git/commit
Convert HttpStateData (aka. Http::Client) response buffer to use SBuf
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 11 Nov 2014 13:55:41 +0000 (05:55 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 11 Nov 2014 13:55:41 +0000 (05:55 -0800)
commit395a814a5b0c68847ebdfc70f8a30573b4fea8d6
treebfb47704583ad8367abad535a504d286bd44bc0a
parentf2554f0fee808ef75a88494179e1325a1dbb5757
Convert HttpStateData (aka. Http::Client) response buffer to use SBuf

This replaces the MemBuf used to receive server responses with an SBuf in
preparation for use by an Http1::ResponseParser.

As part of this convert the I/O read processing to Comm::Read / ReadNow
API with read(2) operation happening in the read handler instead of
buried in the comm code. A side effect of this is detaching the read
operation from StoreEntry::delayAwareRead().

Two temporary performance regressions are necessarily introduced with
these changes:
* The worst is a data copy from SBuf input buffer to a temporary MemBuf
  so that the chunked body decoder can process the content. This will
  only be able to be removed when teh chunked decoder is itself converted
  to process an SBuf.

* Also, until the new Http1::ResponseParser is implemented we need to
  copy the response header contents into a temporary MemBuf for the old
  HttpReply::parse() method to process.
src/http.cc
src/http.h