Amos Jeffries [Tue, 13 Jan 2009 06:17:33 +0000 (19:17 +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 [Thu, 8 Jan 2009 13:45:29 +0000 (02:45 +1300)]
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 uch 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 ientical 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 [Tue, 6 Jan 2009 13:13:44 +0000 (02:13 +1300)]
Untangle CacheManager reports from log_fqdn
The fqdnFromAddr() call depends on log_fqdn to generate the FQDN. But
CacheManager needs to always display it whenever available. This removes
the call indirection, dependency and makes Name: field only display when
a name is available.
Amos Jeffries [Sun, 4 Jan 2009 12:49:16 +0000 (01:49 +1300)]
Fix pinger immediate shutdowns
pinger runs okay when started manually, but shuts down after a sucessful
startup when run by Squid. This was due to the last_request timer being
left at zero/epoch.
Amos Jeffries [Wed, 24 Dec 2008 13:59:42 +0000 (02:59 +1300)]
Author: Alexander Lukyanov <lav@yar.ru>
Bug 2330: allow keep-alive+chunked; don't add max-age for no-cache
Attached patch enables keep-alive for chunked transfer-encoding, as such
encoding allows to determine reply body end.
Also the patch disables adding of max-age to requests with no-cache flag. It
saves a few bytes and also makes less difference between the incoming and
outgoing requests. Max-age is obviously not useful for no-cache requests.
NP: amended after bug discussion to also skip adding of no-cache on
internal calculation from local state which may not be correct
down the line in other caches. (nocache includes local config settings).
Amos Jeffries [Wed, 24 Dec 2008 12:29:38 +0000 (01:29 +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 [Wed, 24 Dec 2008 06:42:47 +0000 (19:42 +1300)]
Polish ZPH configuration interface
This completes the ZPH patch merge for Squid 3.1. It makes significant
changes to the squid.conf options previously used.
ZPH controls are now formally called "qos_flows" with a set of options
to set individual output flow TOS based on the flow source. see squid.conf
documentation for details.
Since this is new IP-layer code it also places the new QoS code in a
directory src/ip/ and library libip.la inline with the planned source
layout model.
Amos Jeffries [Wed, 17 Dec 2008 06:07:03 +0000 (19:07 +1300)]
Smart pthread library linkage
Fixes linkage errors caused on some systes by a clash between the
DiskIO library not being in src/ directly and impicit linkage used
previously used by the auto-tools chain.
* Only link it to objects linking DiskIO which need it explicitly.
* Produce a fatal error message if its required but missing.
The tunnel.cc code when a connection (the server or client) is closed set its
filedescriptor to "-1", and check if the filedescriptor is "-1" to decide if
the socket is still valid or not. This is not correct because maybe the socket
had closed but the comm_close handler was not called yet (The related AsyncCall
scheduled but not executed yet)
To check if a file descriptor "fd" is closed the fd_table[fd].closing() also
should checked.
The bug here is that the filedescriptor is not passed with the other
parameters to the asyncCall. If the filedescriptor closed before the asyncCall
scheduled the execution of the asyncCall will not canceled and the
ICAPXaction::noteCommConnected will try to read/write on a closed socket.
AYJ: Not entirely certain this fix and bug go together, but they appear
to and it definately fixes a different related assertion.
Henrik Nordstrom [Wed, 10 Dec 2008 20:19:50 +0000 (21:19 +0100)]
Various make dist/clean/distclean fixes. No code changes.
- Workaround for src ../test-suite/test_tools.cc dependency crashing
make distclean. Automatically copy the file to src to compile.
- "make dist" fixes to not include generated files. Mainly involves
moving them to a suitable nodist_..._SOURCES variable.
- "make clean" fixes to remove generated files
- Always recurse configure into sub-projects. make dist fails othewise.
- Removed fatal error from squid_kerb_auth configure if no kerberos
lib found (also a fatal error at build time)
Amos Jeffries [Thu, 4 Dec 2008 23:55:38 +0000 (12:55 +1300)]
Remaining build issues in HEAD tests.
Several missing symbols added to CommIO stub and extra smart storeio
checks to prevent duplicate object linkages when both async-io and
storeio are enabled.
Amos Jeffries [Mon, 1 Dec 2008 11:32:52 +0000 (00:32 +1300)]
Rollback rev 9253 from 3.1
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.1.0.2 and earlier releases are known to contain many
invalid entries. 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 may be worth purging caches on upgrade out of these versions.
Amos Jeffries [Mon, 1 Dec 2008 11:19:28 +0000 (00:19 +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 may have any change in behavior
as a result.
Amos Jeffries [Sun, 30 Nov 2008 09:08:48 +0000 (02:08 -0700)]
Many small fixes uncovered by the testbed layer #02
- failover recovery for valgrind support
- better error reporting and detection for epoll support
- better dependency detection and handling for ESI support
- ARP build error on FreeBSD
- hack: silence build error on ZPH QoS support (TODO fix)
TODO:
- fix ZPH support for BSD (Bug 2537)
- comm symbol duplication failures under gcc 4.3.2
Amos Jeffries [Sun, 30 Nov 2008 05:29:55 +0000 (22:29 -0700)]
Real fix build errors in squid_kerb_auth
Seems my configure hack overlooked some auto-conf magic side-effects.
This moves most squid compat hacks into squid_compat.h for now.
Really fixes the current build issues in squid_kerb_auth with Squid.
Amos Jeffries [Wed, 19 Nov 2008 12:00:15 +0000 (01:00 +1300)]
Bug 2525: invalid encoding of non iso-8859-1 error pages
Translation toolkit was not updating the content-type when bundling
translations. It has since been updated to a version which does 'tidy'
the output HTML.
Also updating the default templates ISO-8859-1 coding to UTF-8
to present a usable backup in case of such future failures.
Amos Jeffries [Fri, 14 Nov 2008 16:14:29 +0000 (05:14 +1300)]
Fix assertion in DskIO and Ufs unit tests
Classes whose initialization is implied from the presence of a soliton
do not get initialized when their soliton is hidden away in a library.
Only when the object is linked to a main app.
DiskIO modules are such and require a hook to probe the soliton before
initialization kicks off. This patch adds such a hook function which is
called from the manager setup function to probe all built modules and
ensure their existance and registration is done before initializing.
Also adds a lot of function documentation in various places.
Amos Jeffries [Wed, 12 Nov 2008 04:55:12 +0000 (17:55 +1300)]
Correct debugs output on GetDenyInfo
deny_info pages are expected to be redirects sometimes.
It's only the particular lookup which can't use them.
Also they may not be a match anyway since test was done after warning.
Amos Jeffries [Sun, 9 Nov 2008 03:37:11 +0000 (16:37 +1300)]
COSS removal from Squid-3
I'm expanding the COSS 'removal' from just 3.0 to all Squid-3.
The hoped for work has not yet been presented. When someone is available
they need to revert this patch. - Amos
We had a vote on this some (several) months before 3.0 got branched, and
it was decided to drop COSS from the Squid-3.0 branch once branched.
Then the branching got delayed, and this task was forgotten when it
finally branched.
Until COSS gets significantly updated it's counter-productive to ship it
in STABLE releases. But the current code needs to be kept in trunk as
reference on how things got refactored for the day the current COSS code
gets forward ported to Squid-3.