]> git.ipfire.org Git - thirdparty/squid.git/commit
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 9 May 2009 07:03:02 +0000 (19:03 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 9 May 2009 07:03:02 +0000 (19:03 +1200)
commit37b098278b504815806dccc3f2262b354c6ee461
treea6456ff67eb211f78906e6956f297944b7f0de15
parentaeafa72f44406548b24793667c1a4066a5c2782e
Author: Alex Rousskov <rousskov@measurement-factory.com>
Added temporary hack to support chunked HTTP/1.1 requests.

A broken or confused HTTP/1.1 client may send a chunked HTTP request to Squid.
Squid does not have full support for that feature yet. To cope with such
requests, Squid now buffers the entire request and then dechunks request body
to create a plain HTTP/1.0 request with a known content length. The plain
request is then used by the rest of Squid code as usual.

The newly added chunked_request_body_max_size option specifies the maximum
size of the buffer used to hold the chunked request before the conversion. If
the chunked request size exceeds the specified limit, the conversion fails,
and the client receives an "unsupported request" error, as if dechunking was
disabled.

Dechunking is enabled by default. To disable conversion of chunked requests,
set chunked_request_body_max_size to zero.

Squid cannot buffer chunked requests exceeding MEM_BUF_MAX_SIZE, which is
currently 2*1000*1024*1024 bytes. The default chunked_request_body_max_size
value is 64KB.

Request dechunking feature is a temporary hack. When chunking requests and
responses are fully supported, there will be no need to buffer a chunked
request. Client_side code contains a FUTURE_CODE_TO_SUPPORT_CHUNKED_REQUESTS
section that can be used as a starting point for proper support. That code was
working in simple tests.

This dechunking code requires ICAP support in Squid v3.0 because of the
ICAP/ChunkedCodingParser dependency.
src/HttpMsg.cc
src/HttpMsg.h
src/cf.data.pre
src/client_side.cc
src/client_side.h
src/structs.h