Alex Rousskov [Sat, 27 Sep 2008 18:17:22 +0000 (12:17 -0600)]
Use message representatives to store virgin and adapted messages.
Migrating to a model where all message changes are done via transaction,
not the message itself. A message cannot handle many changes on its own
because it is not a job, and placing some changes in MessageRep and some
in XactionRep results in messy code.
Alex Rousskov [Sat, 27 Sep 2008 18:12:43 +0000 (12:12 -0600)]
Synced with libecap changes related to FirstLine move to Message.
Migrating to a model where all message changes are done via transaction,
not the message itself. A message cannot handle many changes on its own
because it is not a job, and placing some changes in MessageRep and some
in XactionRep results in messy code.
Amos Jeffries [Thu, 5 Jun 2008 03:54:46 +0000 (15:54 +1200)]
Update ACL docs
- Some regex types were missing -i mentions.
- Altered auth type to mention intercept alongside transparent
now that they are distinct in squid
- Also cosmetic re-order of a few items to provide a some type grouping
Amos Jeffries [Thu, 22 May 2008 12:05:45 +0000 (00:05 +1200)]
Silence secondary errors on fatal shutdowns.
This patch causes fatal() errors to set the shutdown flag before aborting.
The result of this is that secondary errors not related to the fatal condition
but caused during the shutdown sequence no longer confuse the error traces.
It also cleans up a little broken whitespace formatting in the snmp_core.cc
Guido Serassio [Sat, 17 May 2008 11:27:47 +0000 (13:27 +0200)]
Windows port: Added new mswin_check_ad_group external ACL helper
This helper allow the lookup of users's group membership in a Windows
Active Directory domain.
It overcomes the Lan Manager limits of mswin_check_lm_group, but it can be
used only with native Windows Active Directory domains, so mswin_check_lm_group
will not removed from Squid.
Alex Rousskov [Fri, 16 May 2008 00:41:07 +0000 (18:41 -0600)]
Implemented libecap::Message-related wrappers and retested with a no-op
REQMOP and RESPMOD adapter.
Fixed Server destruction bug, polished message cloning.
See commit messages included below for details.
Alex Rousskov [Fri, 16 May 2008 00:26:57 +0000 (18:26 -0600)]
Removed assert(!theInitiator) from the destructor because that assertion fails
if a child constructor fails. AsyncJob should have wasStarted flag so that we
can assert(!(wasStarted && theInitiator)), which will not fail for non-started
jobs.
Alex Rousskov [Fri, 16 May 2008 00:23:52 +0000 (18:23 -0600)]
Moved cleanup to swangSong, where it belongs. We must not call virtual
functions from the destructor and cleanup requires calling virtual functions.
This change also ensures that we do not unlock request and response until
we are done with body piping. This change is unrelated to eCAP, but the fixed
bugs were exposed by eCAP testing.
Alex Rousskov [Fri, 16 May 2008 00:20:39 +0000 (18:20 -0600)]
When cloning, clone the pointer to the body pipe. The caller may need to
make pipe adjustments, depending on how the body will be used. Note that
we cannot clone the body or even the pipe. We can only share it between
the clone and "cloner".
Amos Jeffries [Tue, 13 May 2008 08:56:04 +0000 (20:56 +1200)]
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 reverts the behaviour to what was reportedy available in 2.5.
Adding 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.
Alex Rousskov [Thu, 8 May 2008 20:19:48 +0000 (14:19 -0600)]
Added eCAP-specific squid.conf options: ecap_enable and ecap_service.
It is not clear whether we should have ecap_service and icap_service or
merge the two as adaptation_service and just look at the protocol field
of the service URI. One reason to keep the options separate is that some
ICAP services might use http schemes in their URIs, but I do not know how
common that is. Another reason is it makes it easier to add protocol-specific
options.
TODO: Discuss whether similar eCAP and ICAP options should be documented
separately. The alternative is to document one of them and point to that
documentation from the other.
Removed ICAPConfig from deprecated icap_ options that do not use it anymore.
Alex Rousskov [Thu, 8 May 2008 20:16:36 +0000 (14:16 -0600)]
Added Adaptation::Message that brings together the HttpMsg and the
corresponding body_pipe and handle HttpMsg locking.
TODO: This class should not be needed. HttpMsg already has body_pipe. In the
past, we could not use that pipe "as is" because some other code would steal
it from the message. Once such cases are removed and something like
HttpMsg::Pointer is added to handle locking, there will be no need for
Adaptation::Message.
TODO: ICAPInOut should be replaced with two Adaptation::Messages, one for the
virgin message (that often has a body) and one for the cause, even though the
ICAP cause does not need a body.
Alex Rousskov [Thu, 8 May 2008 20:10:05 +0000 (14:10 -0600)]
Added Adaptation::Message that brings together the HttpMsg and the
corresponding body_pipe and handle HttpMsg locking.
TODO: This class should not be needed. HttpMsg already has body_pipe. In the
past, we could not use that pipe "as is" because some other code would steal
it from the message. Once such cases are removed and something like
HttpMsg::Pointer is added to handle locking, there will be no need for
Adaptation::Message.
TODO: ICAPInOut should be replaced with two Adaptation::Messages, one for the
virgin message (that often has a body) and one for the cause, even though the
ICAP cause does not need a body.
Alex Rousskov [Thu, 8 May 2008 20:03:16 +0000 (14:03 -0600)]
Added HttpRequest::clone(). HttpReply already had that method, but it is
not complete as some fields are not cloned yet.
TODO: This should be done via copy constructors. The constructors can be
made protected to minimize chances of accidental copying of messages.
Amos Jeffries [Thu, 8 May 2008 03:47:53 +0000 (15:47 +1200)]
Bug 2222 part 2: ipv4 client trying to view an ipv6 website crashes FreeBSD squid
This one:
- omits the v6-specific socket options on new addrinfo
- correctly counts the failed connection
- Resets the socket when a protocol error is found
- retries without any delay
Amos Jeffries [Wed, 7 May 2008 09:41:50 +0000 (03:41 -0600)]
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 [Wed, 7 May 2008 07:50:28 +0000 (01:50 -0600)]
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.
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 [Fri, 2 May 2008 10:37:01 +0000 (22:37 +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.
Guido Serassio [Thu, 1 May 2008 16:19:06 +0000 (18:19 +0200)]
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.
Import strnstr from FreeBSD sources. Needed for some string-safe operations.
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.
This patch merges part 2 of the TPROXY-related updates.
- Makes interception handling flags and options always-present
- Updates squid.conf http_port options for clarity
- Builds structure for sequential lookup of multiple interception methods
- Performs sequential lookups for IPFW and multiple Netfilter targets
if Squid configured to enable those transparency methods.
- Pulls most of the TPROXYv2 related code out of Comm into IPInterception
IPFW changes are still experimental, but Netfilter targets have been tested.
TODO: depending on the anoyance levels a better logging method for NAT
failures may need to be implemented. The existing methods of logging
one-per-N seconds, for all lookup methods may prove annoying.