Amos Jeffries [Wed, 18 Feb 2009 10:58:53 +0000 (23:58 +1300)]
Author: Francesco Chemolli <kinkie@squid-cache.org>
String NG : basic SquidString updates pt 2
- finished the analysis of raw buffer exporting, divided among c-sting
and raw-buf access clients
- general sanitization
- reversal of some wrongly-renamed variables and comments
- implementation of SQUIDSTRINGPRINT and SQUIDSTRINGPH (placeholder) macros and
psize() function for printf-style calls
- implementation of, and migration to, String::size_type and String::npos
- de-inlining of pos(), rpos(), find() and rfind() calls
- implementation and use of a proper substr() call
Amos Jeffries [Wed, 18 Feb 2009 09:45:46 +0000 (22:45 +1300)]
SourceLayout: setup libcompat.la for portability primitives
This library forms an underlayer which intends to be seamless for the rest
of Squid.
For code to be eligible for inclusion at this lowest layer it must be
emulating or wrapping a piece of OS-provided API for use on other OS
where it is not provided.
Shared code which is unique to Squid is not portability.
API mappings which are OS-specific are all defined for their particular
OS in the os/* files.
API mappings which are provided by multiple OS or support libraries
are mapped in compat/*
Emulators are acceptable, though the aim should be to inline or template
most of the code so only .h are really needed.
Fixed typo in DelayTaggedBucket::stats.
Added comments.
String.cci doesn't need to include squid.h, config.h is enough
In errorpage.cc there is no need to drop to char* land, we can work with String.
An access checklist required for each service set, so we need only one
AccessRule object for each adaptation service set
This patch:
- When parses a adaptation_access line checks if an AccessRule object exist
for the service set and if yes append the access checklist to this object else
creates a new AccessRule object for this service set
- The AccessRule constructor takes as argument now the reference service set
name (groupId)
- The new Adaptation::FindRuleByGroupId method created. This method returns
the AccessRule object for a service set using its name (groupId)
Implemented String.psize() (for printf())
Changed String storage size from 'unsigned short int' to size_t
Implemented String.rfind()
Implemented String.substr() and related tests
Made String.set() private, it's ready to be removed unless there's any dissent
Converted ftp.cc to use rfind in place of rpos
Amos Jeffries [Mon, 9 Feb 2009 05:33:18 +0000 (18:33 +1300)]
Bug 419: Hop by Hop headers MUST NOT be forwarded (attempt 2)
This attempt builds on Henriks re-work of the client-request to
server-request cloning done since the last attempt was made at closing
this bug.
Adds all RFC 2616 listed Hop-by-hop headers to the clone selection test
as 'ignore' cases unless otherwise handled already.
The test for whether they exist in Connection: is moved to the default
case as an inline. Which reduces the code a fair bit and prevents the
side case where a specially handled header gets ignored because the
client explicitly added it to Connection: when it did not have to.
This method sets up a background default of not passing the hop-by-hop
headers while allowing any code which explicitly sets or copies the
headers across to operate as before without interference.
Amos Jeffries [Sun, 8 Feb 2009 03:26:04 +0000 (16:26 +1300)]
TestBed: add slave tester script
This is draft #2 of the multi-machine script. I have it running locally.
As an intermediary step to kick wider testing until we get something
better going. This script can be run by cron and sends an email to
noc@squid-cache.org detailing the local system OS, CPU, and build results.
Requires:
sendmail or mailer providing sendmail API
bzr with checkout of (trunk, SQUID_3_1, or SQUID_3_0)
Amos Jeffries [Sun, 8 Feb 2009 00:02:47 +0000 (13:02 +1300)]
Author: Francesco Chemolli <kinkie@squid-cache.org>
Cleanups: Remove code handling K&R-style varargs.
It should be a safe enough bet that any C++ compiler can handle STDC-style varargs.
This patch removes all the (mostly spaghetti) code which used to handle K&R-style varargs calls.
Amos Jeffries [Fri, 6 Feb 2009 07:54:05 +0000 (20:54 +1300)]
Author: Francesco Chemolli <kinkie@squid-cache.org>
String NG : fixes initial merge, take 2
Compared to the retired first attempt it:
- fixes the issues Tsantilas Christos found out about
- implements String::find
- some more users analyzed and fixed.
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 [Wed, 4 Feb 2009 09:52:20 +0000 (22:52 +1300)]
Bug 2526: pt 2: default ALLOW when no list specified.
Fallout from audit of access control checks.
- Some got sensible defaults added
- many got slightly more optimized defaults
- documented the ACLChecklist interface and some API cleanups
Converted more String.unsafeBuf users
String.operator[] now returns a copy of a char rather than a reference.
Implemented StringNg-alike String.find() method. Eventual aim is to get rid of users of String.pos()
Inside the Adaptation::Initiator::announceInitiatorAbort method the check
x==NULL is not enough. We must also check if the x variable (of type Initiate)
is valid.