Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After a ReadNow() call, the buffer length must not exceed accumulation limits (e.g., client_request_buffer_max_size). SBuf::reserve() alone cannot reliably enforce those limits because it does not decrease SBuf space; various SBuf manipulations may lead to excessive SBuf space. When filled by ReadNow(), that space exceeds the limit. This change uses documented CommIoCbParams::size trick to limit how much Comm::ReadNow() may read, obeying SQUID_TCP_SO_RCVBUF (server-to-Squid) and client_request_buffer_max_size (client-to-Squid) accumulation limit.
- Loading branch information