Resize HttpDecoder::buffer_ when buffering data.

Before this change, HttpDecoder::buffer_ was always empty.  A
std::string::reserve() call made sure its storage was large enough, and that
memory was address directly, always beyond the size of the string object.

After this CL, the size of buffer_ reflects the amount of buffered bytes, and
memory beyond its size is never addressed.  The reserve() call is preserved to
avoid reallocation and copy as the buffer grows.

PiperOrigin-RevId: 365076891
Change-Id: If58949fd10fe1741416dab4691faa5c3e728ad8e
1 file changed
tree: edbe35a08abbbc97981b9147e24e37fa17205397
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects. QUICHE is only supported on little-endian platforms.

Code can be viewed in CodeSearch in Quiche and is imported into Chromium.