Amos Jeffries [Tue, 13 May 2008 14:51:16 +0000 (08:51 -0600)]
Add cachemgr.conf.default for easier maintenance
cachemgr.conf has for a long while been created conditionally if none
already existed, but no current new default file was added to compare
for new configuration options.
This patch adds a file named cachemgr.conf.default next to the cachemgr.conf
cachemgr.conf.default file is replaces unconditionally so that it remains
current with the most recently installed build.
cachemgr.conf itself is only created if not already present so as not to
loose local configuration changes.
Amos Jeffries [Mon, 12 May 2008 01:51:12 +0000 (13:51 +1200)]
Bug 2206: Build error caused by incorrect configure include file detection
Adds type-definitions for the *BSD family networking OS header files which
depend on them without including the necessary definition headers themselves.
Amos Jeffries [Mon, 12 May 2008 01:48:26 +0000 (13:48 +1200)]
Bug 2196: configure: net*/*.h present but cannot be compiled
This moves critical net*/*.h file tests from the general location
and use testign to the *BSD special testing which accounts for
system file dependencies.
TODO: some files are still missing dependencies even with the *BSD test
their brokenness will be fixed at a later point. (bug 2206)
Amos Jeffries [Sun, 4 May 2008 11:53:29 +0000 (23:53 +1200)]
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
Make --with-large-files try to build 64-bit if possible
--with-large-files for some reason tried to make a 32-bit build with
large file offsets even if the host supports 64-bit applications, making
--with-large-files degrade Squid capabilities on 64-bit OS:es..
Amos Jeffries [Sun, 4 May 2008 11:08:15 +0000 (23:08 +1200)]
Author: Guido Serassio <serassio@squid-cache.org>
Windows port: Add support for the Windows machine DNS domain, and also automatically derived default domain
This patch adds the capacity to get the machine DNS domain from the registry, similar to
search but only accepting a single domain.
In addition it adds support for automatically deriving the domain from
the fully qualified hostname.
Also fixed some memory leaks during the DNS configuration parse in the registry.
Amos Jeffries [Sun, 4 May 2008 11:05:58 +0000 (23:05 +1200)]
Author: Guido Serassio <serassio@squid-cache.org>
Removed the advertisement clause from BSD license
According to the new revised (3-clause) BSD license:
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
the advertisement clause (3) of old (4-clause) BSD license can
be deleted.
Also added forgotten reference to lib/strnstr.cc into CREDITS
Adds --enable-zph-qos options to turn on the following:
- Allows you to select a TOS/Diffserv value to mark local hits.
- Allows you to select a TOS/Diffserv value to mark peer hits.
- Allows you to selectively set only sibling or sibling+parent requests
- Allows any HTTP response towards clients will
have the TOS value of the response comming from the remote
server masked with the value of zph_preserve_miss_tos_mask.
For this to work correctly, you will need to patch your linux
kernel with the TOS preserving ZPH patch.
The kernel patch can be downloaded from http://zph.bratcheda.org
- Allows you to mask certain bits in the TOS received from the
remote server, before copying the value to the TOS send towards
clients.
Amos Jeffries [Fri, 2 May 2008 11:08:58 +0000 (23:08 +1200)]
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug 2308: Segmentation fault in AuthDigestUserRequest::authUser
In this patch:
- In method AuthDigestConfig::decode just do not delete the digest_request on
errors but use it as is in the authDigestLogUsername functions.
- In the method AuthDigestConfig::fixHeader change the line "int stale = 1;"
to "int stale = 0;" to make squid respond with "stale=false" in the first
unauthenticated request of web client.
strnstr() is not provided on all OS (Linux with gcc 3.x for one).
And some OS are known to bundle an unsafe version (MacOS X 10.4 has a
buffer overrun)
So code should use the function named squid_strnstr() and auto-tools will
test to see if the OS provided version is usable.
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug 2311: crashes/restarts when ICAP enabled on respmod for HTTP body size greater than 100kb
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
Bug #2310: Incorrect default time/date log format
The %tl and %tg logformat tags is meant to use the same date format as
Apache/NCSA, but in Squid-3 there was a space instead of : between the
date and time.
Reentrant debugging occurs when something being written into the debugging
stream produces its own debugging. For example, a field accessor method may
make cbdata-validation calls, which would produce debugging. Logging such
field would crash Squid if sufficiently high debugging level is enabled.
With this change, the Debug methods detect reentrant calls and mostly ignore
them, allowing the caller to append debugging information to the existing
debug stream. A short debugging label is added before and after the reentrant
debugging message to reduce confusion that overlapping debugging statements
may cause during log analysis.
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
Fallback on transparent interception mode even if the connection didn't seem to be transparently intercepted
Needed to deal properly with situations where connections to the local host
is intercepted, or when people NAT outside the Squid server but still compile
Squid with support for the NAT/interception method availabe on the host OS..
Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf integer options.
Author: Alex Rousskov <rousskov@measurement-factory.com>
Squid3 parses squid.conf file integers as decimal numbers while Squid2 honors
0 and 0x prefixes (indicating octal and hex numbers). The later functionality
is needed for things like unmask that are traditionally specified using octal
format.
This patch changes Squid3 behavior to match that of Squid2.
Internally, Squid3 uses sscanf and Squid2 uses strtol.
TODO: Squid3::GetInteger should probably use xatol,
and xatol should be fixed to proper verify the result of strtol.
Amos Jeffries [Fri, 14 Mar 2008 04:45:16 +0000 (17:45 +1300)]
Bug #1634: no Proxy-Authenticate header in 407 responses
This is a temporary fix partially reversing the fix for bug 1923.
It is likely to be superseded in future releases. It is intended only to
restore critical previous behaviour to squid as a short-term measure.
amosjeffries [Wed, 27 Feb 2008 18:24:18 +0000 (18:24 +0000)]
Author: rousskov
Added a CPPUNIT assertion to test whether a failed CPPUNIT test case properly
destructs local objects on exit.
If a previous test case fails for any reason, the new assertion will fail
instead of store_dir.cc aborting. This may save us from tracking non-existent
StoreController initialization bugs.
amosjeffries [Wed, 27 Feb 2008 17:47:59 +0000 (17:47 +0000)]
Several String fixes.
- Add two missing includes when configured --disable-inline
- SegFault when newly allocated string set to 0-length.
buf_ may be NULL and buffer overruns on truncate attempt
amosjeffries [Wed, 27 Feb 2008 17:45:50 +0000 (17:45 +0000)]
Author: rousskov
The connect(2) system call might return "connection ready"
status even for a non-blocking file descriptor. The connection
itself can never be immediately ready in reality because of the
TCP handshake, but I am guessing that in some environments, the
TCP stack fakes/optimizes local connection readiness. We have
seen that for loopback sockets on FreeBSD 6.2, for example, but
the behavior is probably OS- or OS-configuration specific.
If connect(2) is immediately successful, comm module
immediately calls the callback. This means that the callback is
called while the same callback is being registered with comm.
ICAP does not allow this "re-entrance" and other code might not
deal well with it.
The change overwrites connect(2) result so that Squid does not
think that connect(2) was immediately successful. Instead of
calling the callback, Squid then schedules the connection
write-ability check.
The NativeAsyncCall development will fix this and remove the
need to overwrite connect(2) result because comm will always
call callbacks asynchronously.
amosjeffries [Wed, 27 Feb 2008 17:43:56 +0000 (17:43 +0000)]
Author: Steven Wilton <swilton@q-net.net.au>
Sort cache list in wccpv2 to ensure a consistent hash allocation across all serv
ices
Under some circumstances different caches were being allocated differnet hash
assignments for different wccpv2 services. This caused problems when using
TPROXY as the reply traffic was being sent to a different cache than the request
causing problems in browsing web pages.
This patch applied a selection sort algorithm to the cache list to ensure that
as long as the same group of caches are registered for any number of wccpv2
services, they will be allocated the same hash assignments in the router.
checkRetry is now guaranteed to return false for requests that checkRetriable
previously returned false. This prevents retries of requests with
non-idempotent methods, for example.
amosjeffries [Wed, 27 Feb 2008 17:41:16 +0000 (17:41 +0000)]
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug 2172: When user fails authentification Squid restarts
Replaced an assertion that there is no auth_user_request, a comment what
to do when there is no auth_user_request, and a comment that there can
be no auth_user_request with what the first comment suggested to do.