Amos Jeffries [Sat, 9 May 2009 07:03:02 +0000 (19:03 +1200)]
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.
-Method TunnelStateData::Connection::error:
The xerrno is the errno values (EAGAIN, EINTR etc) not a COMM_XX error/flag.
- Methods TunnelStateData::writeServerDone,TunnelStateData::writeClientDone:
if the related connection fd closing (flag==COMM_ERR_CLOSING) just return
Bug 2610: Detection and verification of ipfilter header files is incorrect
After much contention reg Solaris and FreeBSD the union between them
seems to be this:
- adding netinet/in.h
- adding netinet/ip_fil_compat.h (alternative to netinet/ip_compat.h)
- testing for netinet/ipl.h before netinet/ip_nat.h
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug 2578: squid fails to resume dowload from FTP
The ftp code uses the FtpStateData::restart_offset and
FtpStateData::restarted_offset to compute the offset in the case of
partial responses, but it must also set the
ServerStateData::currentOffset member variable.
This patch:
- completely removes the FtpStateData::restarted_offset member and uses
the ServerStateData::currentOffset member variable instead.
- adds the FtpStateData::setCurrentOffset(int64_t) and
FtpStateData::getCurrentOffset() public methods to allow set/get the
ServerStateData::currentOffset value
Author: Mark Nottingham <mnot@pobox.com>
Bug 2599: Idempotent start
As discussed on squid-dev, Squid shouldn't return a shell error when:
- starting squid, if it's already running
- stopping squid, if it isn't running
This is to make writing scripts that control squid easier.
Note that it should still notify the user, and should not affect other
operations (e.g., kill, rotate, parse).
Amos Jeffries [Thu, 19 Feb 2009 02:08:56 +0000 (15:08 +1300)]
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
external_acl_type %<{ and %USER_CERT_ / %CA_CERT_ parsing brokenness
The parsing of external_acl_type formats was sligtly broken, destroying
%<{ (request header) if SSL was enabled and never able to parse %USER_CERT_
or %CA_CERT_..
Also clarified request/reply header syntax slightly
Amos Jeffries [Sun, 8 Feb 2009 09:34:00 +0000 (22:34 +1300)]
Author: Francesco Chemolli + Amos Jeffries
Pconn not being used when they should.
A slight misalignment between the keys generated for push and pop of
connections to the waiting pool caused new connections never to match
any of the existing connections.
This patch makes several alterations to achieve a fix:
- reduces the FwdState push logics down into a simple selection in
pconnPush function which previously was a dumb wrapper.
- adds a dump of current hash keys to the cacheManager pconn report
- adds much better debugging to the pconn process at level 48,3 and 48,6
- adds some additional documentation of code to the related call tree
Pconn API after this patch :
The Pconn KEY takes several parameters (host, port, domain, client-ip).
For HTTP requests this is normally generated from the request data of
same name with domain being optional since it may be identical to host.
However for peer-sourced requests this alters slightly and the host:port
fields become the peer NAME and HTTP-PORT.
This means the pconn key in abstract becomes a key to the TCP remote-end of
the link with an optional anchor on the domain being requested.
Amos Jeffries [Sun, 18 Jan 2009 03:30:40 +0000 (16:30 +1300)]
Import 3.1 TestBed scripts.
I'm sick of fiddling with the old manual testing permutations.
3.1 testbed is now stable enough to port.
This adds the basic build test structure and layers which 3.0 is currently
known to pass. Some 'make check' errors prevent further layers being added
at this time. That is expected to change.
Amos Jeffries [Sat, 17 Jan 2009 03:04:27 +0000 (16:04 +1300)]
Bug 2556: HTCP fails without icp_port
Removes requirement for ICP port to be open for peer UDP queries to take
place.
TODO: Some work still needs to be done to separate the timeout from
icp_timeout and break ICP specific query logics out into icp code files.
But that is just cleanup for later.
Amos Jeffries [Fri, 26 Dec 2008 21:47:16 +0000 (10:47 +1300)]
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug 2542: squid fails to resume dowload (and breaks content) when any ICAP filter is attached
In the case the icap client is enabled, the
ServerStateData::handleMoreAdaptedBodyAvailable called to handle the incoming
data from the ICAP server. Inside this function a StoreIOBuffer created to pass
the data to the related StoreEntry.
The bug is that the offset passed to the StoreIOBuffer did not count the 206
response offsets.
This patch uses the ServerStateData::currentOffset to compute the correct
offset (which also used in the case the icap client is not enabled).
Amos Jeffries [Mon, 1 Dec 2008 10:39:25 +0000 (23:39 +1300)]
Bug 2526: default ALLOW when no list specified.
The expected behavior of ACL checking should cause an implicit default
deny state to be reached unless a terminating denial causes a state to
flip to allow.
A small logic flaw means that completely explicitly absent access control
list was flipped to ALLOW state.
It is believed that most security controls which have explicitly coded
defaults in ther configuration are not impacted by the bug or its fix.
Only empty delay pools and ICAP re*mods are expected to have any change
in behavior as a result.
Amos Jeffries [Mon, 1 Dec 2008 05:30:29 +0000 (18:30 +1300)]
Rollback rev 8909
This change to StoreIO overlooked the signedness of the StoreIO* length
parameter. It may have resulted in objects that should not have been
store making their way into the cache.
Caches created by 3.0.STABLE10 release are known to contain many invalid
entries when rolled back to STABLE9 release. Whether or not these entries
are fatal to Squid is still unknown. It is currently expected that they
will be erased properly, but cause a lot of cache.log warnings while that
is happening. It is left to admin to decide if its worth purging their
cache on upgrade.