Migrate uses of comm_set_transparent to using comm_openex flag instead.
Cleaner and reduces the overall Comm API.
IPv6 update had incorrectly interpreted comm_open flags as ai_flags.
(same context, different actual name/values)
Bug #2001: Fails to forward responses where headers >4KB
This changes reply processing to clone the already parsed reply header
instead of trying to parse it yet another time. This allows us to seek
over the header contents and that way get away with just having a 4KB
buffer..
In the long run the store client API will be changed to provide a clean
split between headers and body, providing headers in parsed form (including
intermediary 1xx messages) and then the body starting at offset 0. This
change is a first step along that path but without changing the store client
api as such, with the intention of being merged into 3.0.
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..
Selectively roll comm_connect_addr part of the Linux leak fix out of trunk.
The IPAddress and configure parts are left to simplify future testing of why it
does not work in FreeBSD and what went wrong with the sockaddr_storage.
Attempted fix for FreeBSD run-time socket error "(22) Invalid Object" on connects
- Sets the ss_len / sin_len / sin6_len fields of sockaddr_* objects
when retrieved for connection setup.
- Tests the OS at compile time for each of these fields existence to
cope with some OS (ie Linux) not using or providing them.
Alex Rousskov [Thu, 3 Apr 2008 04:41:41 +0000 (22:41 -0600)]
Honor 0x and 0 prefixes as numeric base indication when parsing squid.conf
integer options.
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 [Thu, 20 Mar 2008 11:30:19 +0000 (23:30 +1200)]
3.1 Cleanups pt 1: Add testheaders.sh script
This script automatically tests all .h files in any directory it is passed
(relative to curent make directory) using the compiler options it is also passed.
It should be integrated in to the unit-testing in every Makefile.am so that
it provides dependancy tree testing of all .h without any additional work by
developers, maintainers, or testers.
- puts testheaders.sh script to use in many Makefile.am
(tried for all subdirs tested, but some may have escaped)
- fixes many include problems where .h were not self-sufficient.
They required .cc or other .h files using them to include additional .h
Now any given .h will include all objects it requires for compiling.
(linking is still not guaranteed by this alone)
- References SQUIDHOSTNAMELEN properly as defined by RFC 2181.
Now also split into a proper rfc2181.h for use.
(obsoleting many dependencies on squid.h all by itself)
- Migrates dlink_* (squid custom double-linked-list code) into new object.
(releasing many dependencies on squid.h, structs.h, and protos.h)
- Migrates the SquidConfig* types into SquidConfig.cc, now built into libsquid.la
(releasing many dependencies on structs.h, and globals.*)
- removes squid.h includes from many unit-tests
(releasing them from link-dependencies, .o links not yet cleaned up)
Henrik Nordstrom [Thu, 20 Mar 2008 05:15:04 +0000 (06:15 +0100)]
At the sprint the issue about our current 10ms main loop timeout came
up, and it was suggested the problem most likely have been fixed in
HEAD. And even if it hasn't been fixed it's something which should be
fixed rather than plastered over by spinning around on a short timeout
when there is no activity..
This backs out the change to revert the change..
Alex commit reversing the change said:
revno: 8332
committer: rousskov
branch nick: HEAD
timestamp: Tue 2007-07-24 01:55:21 +0000
message:
Reversed bug #2011 fix because it may slow down ICAP, BodyPipe, and other code
using zero-delay events to implement "asynchronous" calls.
The code should probably be rewritten (a) to avoid any waiting/blocking when
there are ready events and (b) to allow waiting longer when there are no ready
events.
Henrik Nordstrom [Sat, 15 Mar 2008 18:03:11 +0000 (19:03 +0100)]
First stab at header cloning. The motivation behind this is to get rid
of the need of buffering response headers in the server side code
(client_side_reply). A positive sideeffect is that this should also
improve performance considerably.