]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
14 years agoInitial support for breaking the "do all queued I/Os" loop.
Alex Rousskov [Mon, 29 Aug 2011 21:06:59 +0000 (15:06 -0600)] 
Initial support for breaking the "do all queued I/Os" loop.

14 years agoInitial support for breaking the "do all queued I/Os" loop.
Alex Rousskov [Mon, 29 Aug 2011 21:02:27 +0000 (15:02 -0600)] 
Initial support for breaking the "do all queued I/Os" loop.

As the old TODO explained, it is necessary to break the loop to
give IpcIo notifications and other Squid process activities to
progress when many I/Os are queued or after a slow I/O blocks
the disker process for a while. More work is needed to break
based on cumulative I/O time rather than I/O count.

Added and polished debugging.

14 years agoMade FewToFewBiQueue::peek() check both incoming and outgoing queues
Alex Rousskov [Mon, 29 Aug 2011 20:58:29 +0000 (14:58 -0600)] 
Made FewToFewBiQueue::peek() check both incoming and outgoing queues
to find the oldest queued value. This may help when the delay is on
our side (i.e., we are not receiving or processing completed I/Os fast enough).

14 years agoDisable Rock store and shared memory cache if shared memory is not available.
Dmitry Kurochkin [Sun, 28 Aug 2011 17:11:19 +0000 (21:11 +0400)] 
Disable Rock store and shared memory cache if shared memory is not available.

The patch adds support for building on systems without POSIX shared
memory (e.g. OpenBSD).  IpcIo DiskIO module and Rock store is not
enabled by default if shared memory support is not available.  If IpcIo
or Rock store is explicitly enabled, but no shared memory support is
available, fail with error during configure.  Fail with error at
runtime if shared memory cache is enabled but no shared memory support
is detected.

14 years agoFixed overflow testing assertion.
Alex Rousskov [Fri, 26 Aug 2011 22:34:48 +0000 (16:34 -0600)] 
Fixed overflow testing assertion.

14 years agoMerged from parent (trunk r11672, v3.2.0.10+).
Dmitry Kurochkin [Thu, 25 Aug 2011 10:08:49 +0000 (14:08 +0400)] 
Merged from parent (trunk r11672, v3.2.0.10+).

14 years agoFix 'make check' with GCC 4.5.
Dmitry Kurochkin [Thu, 25 Aug 2011 09:54:06 +0000 (13:54 +0400)] 
Fix 'make check' with GCC 4.5.

14 years agoStop Squid-2 automatic daily bundles
Amos Jeffries [Wed, 24 Aug 2011 14:05:19 +0000 (08:05 -0600)] 
Stop Squid-2 automatic daily bundles

14 years agoQuiet trace output on snapshot generation.
Amos Jeffries [Wed, 24 Aug 2011 12:54:45 +0000 (06:54 -0600)] 
Quiet trace output on snapshot generation.

14 years agoFix signed/unsigned comparison warnings in MmappedFile on some systems.
Dmitry Kurochkin [Wed, 24 Aug 2011 08:24:20 +0000 (12:24 +0400)] 
Fix signed/unsigned comparison warnings in MmappedFile on some systems.

14 years agoFix warning in Ipc::Mem::Segment::reserve() on systems with unsigned off_t.
Dmitry Kurochkin [Tue, 23 Aug 2011 20:08:05 +0000 (00:08 +0400)] 
Fix warning in Ipc::Mem::Segment::reserve() on systems with unsigned off_t.

14 years agos/fileno/filen/ in Rock store code to avoid conflicts with fileno(3).
Dmitry Kurochkin [Tue, 23 Aug 2011 16:22:16 +0000 (20:22 +0400)] 
s/fileno/filen/ in Rock store code to avoid conflicts with fileno(3).

Apparently, older GCC versions include more standard headers than it
should which causes build failures.

14 years agoPortability: work through top_builddir. builddir can be undefined
Amos Jeffries [Tue, 23 Aug 2011 13:27:51 +0000 (01:27 +1200)] 
Portability: work through top_builddir. builddir can be undefined

14 years agoOptimize: miss_access absent from config is allow
Amos Jeffries [Tue, 23 Aug 2011 12:23:33 +0000 (00:23 +1200)] 
Optimize: miss_access absent from config is allow

14 years agoFix Rock store test build error with GCC 4.1.
Dmitry Kurochkin [Tue, 23 Aug 2011 11:58:13 +0000 (15:58 +0400)] 
Fix Rock store test build error with GCC 4.1.

Added stub for Ipc::TypedMsgHdr and link with it instead of the whole libipc.

14 years agonegotiate_wrapper_auth: fix warnings on MacOSX by simplification
Amos Jeffries [Tue, 23 Aug 2011 11:13:10 +0000 (23:13 +1200)] 
negotiate_wrapper_auth: fix warnings on MacOSX by simplification

 * fold several if statements down to avoid compiler warnings
   about potential use-before-set of 'length'.

 * remove static err variable as unused once its cases are
   folded down to one if statement.

14 years agoFix build errors when IpcIo DiskIO module is disabled.
Dmitry Kurochkin [Mon, 22 Aug 2011 18:33:49 +0000 (22:33 +0400)] 
Fix build errors when IpcIo DiskIO module is disabled.

Add USE_DISKIO_IPCIO configuration macro and do not build
IpcIo-related Ipc::Strand code when the DiskIO module is disabled.

14 years agoFix build errors when ICMP pinger is enabled.
Dmitry Kurochkin [Mon, 22 Aug 2011 18:30:31 +0000 (22:30 +0400)] 
Fix build errors when ICMP pinger is enabled.

Inline YesNoNone constructor to allow using SquidConfig structure
without linking cache_cf.o.

14 years agoFix build errors when internal DNS is disabled.
Dmitry Kurochkin [Mon, 22 Aug 2011 18:24:59 +0000 (22:24 +0400)] 
Fix build errors when internal DNS is disabled.

Rock store uses *_time_msec functions, so remove !USE_DNSSERVERS
conditional compilation check around them.

14 years agoFix Rock store test linking error when cache digests are enabled.
Dmitry Kurochkin [Mon, 22 Aug 2011 18:22:22 +0000 (22:22 +0400)] 
Fix Rock store test linking error when cache digests are enabled.

14 years agoAdd configure check for shm_open(3) in librt.
Dmitry Kurochkin [Mon, 22 Aug 2011 18:19:13 +0000 (22:19 +0400)] 
Add configure check for shm_open(3) in librt.

This is needed for Linux when building with minimal configuration.

14 years agoBug 2662: cf_gen failure when cross compiling
Bertrand Jacquin [Mon, 22 Aug 2011 14:45:52 +0000 (08:45 -0600)] 
Bug 2662: cf_gen failure when cross compiling

Adds support for "./configure HOSTCXX=foo" to specify a host compiler
to build cf_gen with. If none is specified the normal build compiler will
be used.

14 years agontlm_fake_auth: helper protocol fix on Windows
Francesco Chemolli [Mon, 22 Aug 2011 11:47:16 +0000 (23:47 +1200)] 
ntlm_fake_auth: helper protocol fix on Windows

strncasecmp is not available on MinGW. Use strncmp instead
and rely on squid to send properly-capitalized commands.

14 years agocf_gen requires cstdlib for exit() definition
Amos Jeffries [Mon, 22 Aug 2011 06:36:16 +0000 (00:36 -0600)] 
cf_gen requires cstdlib for exit() definition

14 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 22 Aug 2011 00:13:08 +0000 (18:13 -0600)] 
SourceFormat Enforcement

14 years agoUpdate cf_gen objects to use STL containers and extend syntax for DEFAULT*
Amos Jeffries [Sun, 21 Aug 2011 06:34:26 +0000 (18:34 +1200)] 
Update cf_gen objects to use STL containers and extend syntax for DEFAULT*

Removes all need for explicit memory management of the parsed tree.

Alters DEFAULT: tag to allow multiple line values to be pre-defined.

Adds DEFAULT_DOC: tag to allow text description of a default in the documented
versions of config file instead of explicit code-level values.

Also updates the output slightly so cf_parser.cci conforms to the current
coding style gidelines.

14 years agoTypo in rev.11661
Sergey Merzlikin [Sun, 21 Aug 2011 01:28:59 +0000 (19:28 -0600)] 
Typo in rev.11661

14 years agoBug 3213: https sites (CONNECT) not open when using NTLM
Amos Jeffries [Sun, 21 Aug 2011 00:50:02 +0000 (12:50 +1200)] 
Bug 3213: https sites (CONNECT) not open when using NTLM

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 21 Aug 2011 00:12:49 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoBug 2279: Log Format options to log server source IP and port
Amos Jeffries [Sat, 20 Aug 2011 15:57:06 +0000 (03:57 +1200)] 
Bug 2279: Log Format options to log server source IP and port

 * Add %<a and %<p log format tokens

 * Remove log_ip_on_direct configuration directive

 * Rename %la to %>la and %lp to %>lp

 * polish log format tokens and documentation

 * de-duplicate tunnel.cc and forward.cc updateHierarchyInfo() code.

This last is the only logic change. It involved creating hier.note()
and shuffling bits of code around inside forward.cc to ensure
connection setup had a single function, startConnectionOrFai(), which
began the server connect process for all destination changes.

14 years agoBug 3288: regression in %<la and %<lp
Amos Jeffries [Sat, 20 Aug 2011 08:21:11 +0000 (20:21 +1200)] 
Bug 3288: regression in %<la and %<lp

14 years agoFix logformat token initialization
Amos Jeffries [Sat, 20 Aug 2011 07:57:17 +0000 (01:57 -0600)] 
Fix logformat token initialization

14 years agoDoxygen style updates
Amos Jeffries [Sat, 20 Aug 2011 01:55:49 +0000 (13:55 +1200)] 
Doxygen style updates

It appears that doxygen 1.7.4 takes the header HTML we give it and 'fixes'
missing tags before appending the footer we give it.

14 years agoConverts the bulk of cf_gen to C++ OOP code.
Amos Jeffries [Fri, 19 Aug 2011 03:35:19 +0000 (21:35 -0600)] 
Converts the bulk of cf_gen to C++ OOP code.

* char* tree members to std::string. Which eliminates xstrdup() and
  xis*() calls.

* structs to classes and replaces calloc/free with new/delete.

* link cf_gen_depends.cci directly to autoconf.h defines.

The result of these is that we can erase the dependencies on util.h,
time.cc, config.h, libcompat.la, libmisc.la and other libraries.
Directly fixing seevral build and cross-compile issues that keep appearing
on various OS.

TODO:
 There is a bit further cleanup we can do. Replacing several classes with
 std::list<std::string>.

14 years agoFix make check and make distcheck.
Dmitry Kurochkin [Wed, 17 Aug 2011 23:59:03 +0000 (03:59 +0400)] 
Fix make check and make distcheck.

Mostly Makefile changes.  Libcomm stub moved to tests/ directory
to allow using it on Makefile.am *_SOURCES instead of directly
#including it in test sources.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 17 Aug 2011 00:14:46 +0000 (18:14 -0600)] 
SourceFormat Enforcement

14 years agoCompile fix: use code instead of static initialization
Francesco Chemolli [Tue, 16 Aug 2011 21:42:05 +0000 (23:42 +0200)] 
Compile fix: use code instead of static initialization

g++ 4.4.5 on ARM mis-detects an inizializer's variable size. Give it a hint.

14 years agoAdd special case for CONNECT request Host: verify
Amos Jeffries [Tue, 16 Aug 2011 08:13:38 +0000 (20:13 +1200)] 
Add special case for CONNECT request Host: verify

14 years agoPolish: warn on every ssl-bump disable, with port details
Amos Jeffries [Tue, 16 Aug 2011 00:01:21 +0000 (18:01 -0600)] 
Polish: warn on every ssl-bump disable, with port details

14 years agoAudit updates on rev.11634
Alex Rousskov [Mon, 15 Aug 2011 22:21:03 +0000 (16:21 -0600)] 
Audit updates on rev.11634

14 years agoRework CVE-2009-0801 case set
Amos Jeffries [Mon, 15 Aug 2011 12:47:58 +0000 (00:47 +1200)] 
Rework CVE-2009-0801 case set

 * Correct results when Host: and URL both contain an unusual port.
 * Catch additional cases where implicit default port is made explicit

14 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 15 Aug 2011 00:12:18 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoImprove CVE-2009-0801 detection warning
Amos Jeffries [Sun, 14 Aug 2011 23:34:26 +0000 (11:34 +1200)] 
Improve CVE-2009-0801 detection warning

14 years agoFix NIS helper build on FreeBSD
Pawel Worach [Sun, 14 Aug 2011 12:42:59 +0000 (00:42 +1200)] 
Fix NIS helper build on FreeBSD

Fails on clang++ and other strict compilers due to missing __cplusplus
checks in FreeBSD system headers and yp_prot.h typedefs bool unless
BOOL_DEFINED is defined.

14 years agoConvert AuthenticateAcl() to use new ACL states
Amos Jeffries [Sun, 14 Aug 2011 12:18:57 +0000 (06:18 -0600)] 
Convert AuthenticateAcl() to use new ACL states

14 years agoConvert external ACL to use ACL states
Amos Jeffries [Sun, 14 Aug 2011 11:40:33 +0000 (05:40 -0600)] 
Convert external ACL to use ACL states

14 years agoUpdate response generationg to handle auth ACL reply cases
Amos Jeffries [Sun, 14 Aug 2011 10:47:37 +0000 (04:47 -0600)] 
Update response generationg to handle auth ACL reply cases

Known + expired + OK credentials do not need a re-challenge. They are in
grace period where helper revalidation is all that is needed.

Any other result requires an error or challenge response of some sort.

14 years agoBug 1791: timestampsSet does not validate Date: if server sends very old date
Barry Dobyns [Sun, 14 Aug 2011 03:48:26 +0000 (21:48 -0600)] 
Bug 1791: timestampsSet does not validate Date: if server sends very old date

14 years agoBug 3211: ssl_crtd start even if no ssl-bump port is configured
Christos Tsantilas [Sun, 14 Aug 2011 03:28:48 +0000 (21:28 -0600)] 
Bug 3211: ssl_crtd start even if no ssl-bump port is configured

14 years agoBug 3289: cache manager parameters not parsed without password
Amos Jeffries [Sun, 14 Aug 2011 03:20:59 +0000 (15:20 +1200)] 
Bug 3289: cache manager parameters not parsed without password

14 years agoSupport extended authentication states to ACL results
Amos Jeffries [Sat, 13 Aug 2011 15:53:38 +0000 (09:53 -0600)] 
Support extended authentication states to ACL results

Support sub-states of authentication to be sent as results from ACLs.
This allows future work to resolve issues around cases such as expired
but known credentials being used in fast category access controls.

The new authentication states are:
  ACCESS_AUTH_OK
    - equivalent to ACCESS_ALLOWED

  ACCESS_AUTH_REQUIRED
    - Missing Credentials. Used to be ACCESS_REQ_PROXY_AUTH

  ACCESS_AUTH_EXPIRED_OK
    - Expired now. Were Okay.

  ACCESS_AUTH_EXPIRED_BAD
    - Expired now. Were Failed.

Also converts cases of ACCESS_REQ_PROXY_AUTH to the new name.

As yet no attempt is made to alter auth or access control logics to use
the new states.

14 years agoFix signed/unsigend conversion error
Amos Jeffries [Sat, 13 Aug 2011 14:55:47 +0000 (02:55 +1200)] 
Fix signed/unsigend conversion error

14 years agoFix GCC 4.6 unused variable in regex
Amos Jeffries [Sat, 13 Aug 2011 14:49:59 +0000 (02:49 +1200)] 
Fix GCC 4.6 unused variable in regex

14 years agoTypo in cf_gen
Pawel Worach [Sat, 13 Aug 2011 07:00:23 +0000 (19:00 +1200)] 
Typo in cf_gen

14 years agoBug 3217: "!fd_table[fd].closing()" from ServerStateData::noteMoreBodySpaceAvailable
Alex Rousskov [Sat, 13 Aug 2011 04:15:06 +0000 (22:15 -0600)] 
Bug 3217: "!fd_table[fd].closing()" from ServerStateData::noteMoreBodySpaceAvailable

It is possible that the next hop connection is going through the closing steps
when we receive a "noteMoreBodySpaceAvailable" notification from the response
body consumer. Do not try to read in this case.

14 years agoFix compile errors detected by clang++
Pawel Worach [Fri, 12 Aug 2011 04:32:14 +0000 (22:32 -0600)] 
Fix compile errors detected by clang++

14 years agoMerged from parent (trunk r11623, v3.2.0.10+).
Alex Rousskov [Wed, 10 Aug 2011 15:54:51 +0000 (09:54 -0600)] 
Merged from parent (trunk r11623, v3.2.0.10+).

14 years agoPortability: cf_gen stream errors on FreeBSD
Amos Jeffries [Wed, 10 Aug 2011 14:39:48 +0000 (08:39 -0600)] 
Portability: cf_gen stream errors on FreeBSD

14 years agoBug 3107: nsca_auth DES silently truncates passwords to 8 bytes
Amos Jeffries [Wed, 10 Aug 2011 00:23:14 +0000 (18:23 -0600)] 
Bug 3107: nsca_auth DES silently truncates passwords to 8 bytes

14 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 10 Aug 2011 00:12:19 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoregex optimization: const-correctness
Amos Jeffries [Tue, 9 Aug 2011 14:01:18 +0000 (02:01 +1200)] 
regex optimization: const-correctness

14 years agocf_gen.cc: work around brokenness in Intel's compiler wrt 64-bit fstreams
Francesco Chemolli [Tue, 9 Aug 2011 10:04:54 +0000 (12:04 +0200)] 
cf_gen.cc: work around brokenness in Intel's compiler wrt 64-bit fstreams

14 years agoOptimize regular expression ACLs
Mrcus Kool [Tue, 9 Aug 2011 07:09:03 +0000 (01:09 -0600)] 
Optimize regular expression ACLs

This patch is inspired by the work that I did for ufdbGuard and a few emails with Amos.

The new code optimises lists of regular expressions.

The optimisations are:
* initial .* is stripped
* RE-1 RE-2 ... RE-n are joined into one large RE: (RE-1)|(RE-2)|...|(RE-n)
* -i ... -i options are optimised: the second one is ignored, same for +i

If compounding optimization fails it falls back to using unoptimized
expressions.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 9 Aug 2011 00:12:17 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agocf_gen.cc fix: include errno.h
Francesco Chemolli [Mon, 8 Aug 2011 21:43:52 +0000 (23:43 +0200)] 
cf_gen.cc fix: include errno.h

14 years agoImprove error reporting in cf_gen.cc
Francesco Chemolli [Mon, 8 Aug 2011 19:12:16 +0000 (21:12 +0200)] 
Improve error reporting in cf_gen.cc

14 years agoMigrate cf_gen.cc from C-style stdio to C++ iostreams.
Francesco Chemolli [Mon, 8 Aug 2011 16:05:17 +0000 (18:05 +0200)] 
Migrate cf_gen.cc from C-style stdio to C++ iostreams.

14 years agoRevert rev.11620. Fix unit tests instead of dropping.
Amos Jeffries [Mon, 8 Aug 2011 00:38:41 +0000 (12:38 +1200)] 
Revert rev.11620. Fix unit tests instead of dropping.

Rather than dropping the unit tests if IPv4 state change them to match
the new assumptions that a fresh initialized address object is IPv6-only.

14 years agoRemove hierarchy_stoplist default value
Amos Jeffries [Mon, 8 Aug 2011 00:21:01 +0000 (12:21 +1200)] 
Remove hierarchy_stoplist default value

This should have been done long ago with the other dynamic website
handling changes. It has caused a certain amount of confusion when things
which apparently should go to peers fail to reach them.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 8 Aug 2011 00:12:19 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years ago"make check" after the isAnyAddr patch fails to compile
Christos Tsantilas [Sun, 7 Aug 2011 12:21:57 +0000 (15:21 +0300)] 
"make check" after the isAnyAddr patch fails to compile

An empty IP address is an IPv6 noaddr address now

14 years agoauthor: Christos Tsantilas <chtsanti@users.sourceforge.net>, Amos Jeffries <squid3...
Christos Tsantilas [Sun, 7 Aug 2011 10:26:09 +0000 (13:26 +0300)] 
author: Christos Tsantilas <chtsanti@users.sourceforge.net>, Amos Jeffries <squid3@treenet.co.nz>
Bug fix: The Ip::Address::IsAnyAddr method return false for IPv4 anyaddr.

 - The ip::Address::IsAnyAddr() returns true only for ipv6 anyaddr
   (0000:0000:0000:0000:0000:0000:0000:0000) and returns false when we have an
   ipv4 anyaddr (0000:0000:0000:0000:0000:FFFF:0000:0000)

 - The ip::Address::IsIPv4 method returns false in the case of IPv4 anyaddr.

The above can cause bugs, eg:
 - inside Ip::Address::SetIPv4(). When it is called for an IPv6 anyaddr the ip
   address will  not considred as anyaddr any morei (it IsAnyAddr will return
   false).

 - inside cache_cf.cc file inside dump_generic_http_port function:
   if (s->s.IsAnyAddr() && !s->s.IsIPv6())
        storeAppendPrintf(e, " ipv4");
   The if condition in the above statement can never be true. But the s->s can
   be an ipv4 anyaddr.

 - other places where the code will not work as expected in the case we are
   listening to an ipv4 anyaddr ip address.

This patch:
  - moving the IsIPv4/6 to base purely on the v4-mapped or not
  - making both protocols ANYADDR match the same test
  - making both protocols NOADDR match the same test
  - Fixing the IsIPv4/6 documentation to match the implementation

14 years agoWindows: sys_nerr is not available on MinGW.
Francesco Chemolli [Sun, 7 Aug 2011 09:56:35 +0000 (21:56 +1200)] 
Windows: sys_nerr is not available on MinGW.

14 years agosquidclient: build errors on Windows
Amos Jeffries [Sun, 7 Aug 2011 09:37:18 +0000 (21:37 +1200)] 
squidclient: build errors on Windows

14 years agoWindows: merge WIN32_strerror() and wsastrerror() into xstrerr()
Amos Jeffries [Sun, 7 Aug 2011 09:29:11 +0000 (21:29 +1200)] 
Windows: merge WIN32_strerror() and wsastrerror() into xstrerr()

14 years agoWindows: shuffle win32lib into libcompat
Amos Jeffries [Sun, 7 Aug 2011 09:22:28 +0000 (21:22 +1200)] 
Windows: shuffle win32lib into libcompat

14 years agoPortability: several issues in MinGW
Amos Jeffries [Sat, 6 Aug 2011 03:45:38 +0000 (15:45 +1200)] 
Portability: several issues in MinGW

14 years agoPortability: fix windows socket lirary detection
Francesco Chemolli [Sat, 6 Aug 2011 02:43:50 +0000 (14:43 +1200)] 
Portability: fix windows socket lirary detection

14 years agoPrevent integer overflows when computing configured cache_dir size.
Alex Rousskov [Fri, 5 Aug 2011 17:02:10 +0000 (11:02 -0600)] 
Prevent integer overflows when computing configured cache_dir size.

14 years agoAdded disk_io_timeout to squid.conf to control approximately how long Squid take07
Alex Rousskov [Thu, 4 Aug 2011 07:18:25 +0000 (01:18 -0600)] 
Added disk_io_timeout to squid.conf to control approximately how long Squid
allowsDisconnecting: Timeout, server not responding. queuing time. If the
anticipated I/O time exceeds the configured limit, Squid will not swap the
corresponding object in or out, allowing for the disk queues to drain.

14 years agoKill one goto
Amos Jeffries [Thu, 4 Aug 2011 06:27:17 +0000 (18:27 +1200)] 
Kill one goto

14 years agoSourceLayout: format namespace for custom tag-based formats
Amos Jeffries [Thu, 4 Aug 2011 03:21:06 +0000 (21:21 -0600)] 
SourceLayout: format namespace for custom tag-based formats

Part 1 of enabling non-logging components to support custom formats in strings

Shuffle the log custom format code into its own library separate from the
logging functionality.

One minor logic change removing redundant LogFileEnabled flag.

TODO:
 - use MemBuf instead or as well as StoreEntry as the output buffer
 - separate from AccessLogEntry confusion
 - upgrade deny_info URL generation format
 - upgrade external_acl_type format
 - add custom helper formats

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 4 Aug 2011 00:13:34 +0000 (18:13 -0600)] 
SourceFormat Enforcement

14 years agoBug 3159: delay pools --disable-auth compile problems
Alex Rousskov [Wed, 3 Aug 2011 20:44:38 +0000 (14:44 -0600)] 
Bug 3159: delay pools --disable-auth compile problems

Also adds test-suite scan for --disable-auth issues.

Cherry-picked from trunk (r11472).

14 years agoRe-enable revno11514. Host: verification now done
Amos Jeffries [Wed, 3 Aug 2011 12:52:39 +0000 (06:52 -0600)] 
Re-enable revno11514. Host: verification now done

14 years agoBug 3243: CVE-2009-0801 Bypass of browser same-origin access control in intercepted...
Amos Jeffries [Wed, 3 Aug 2011 12:35:41 +0000 (06:35 -0600)] 
Bug 3243: CVE-2009-0801 Bypass of browser same-origin access control in intercepted communication

Add a verify step between header parsing and http_access to validate that the
Host: header matches the URL for forward-proxied traffic or the destination
IP:port for intercepted traffic.

This is part 1 of the CVE protections. The validation step required to detect
forgery and protect against cache poisoning.

14 years agoauthor: Measurement Factory
Christos Tsantilas [Wed, 3 Aug 2011 08:30:00 +0000 (11:30 +0300)] 
author: Measurement Factory
Bug 3118: ecap_enable on forces icap_enable on

We were updating [Icap|Ecap]::TheConfig even when [icap|ecap]_enable was false,
which may lead to service activation for Icap or Ecap services that should be
disabled. The patch removes such services from service groups before they are
activated.

The patch also warns the user when an adaptation group loses some but not all
of its services due to the new group cleanup code.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 3 Aug 2011 00:16:42 +0000 (18:16 -0600)] 
SourceFormat Enforcement

14 years agoSupport C++0x features where possible
Amos Jeffries [Tue, 2 Aug 2011 07:31:53 +0000 (19:31 +1200)] 
Support C++0x features where possible

This tests for and enables -std=c++0x compiler support on build.

Due to auto_ptr deprecation pieces of the code and a hack to work
around incompatible cppunit code, are converted to use unique_ptr.

When C++0x is available it also tests and uses the nullptr definition
for extra type safety.

14 years agoAdd support for using custom keys in CARP parents
Francesco Chemolli [Tue, 2 Aug 2011 05:15:45 +0000 (07:15 +0200)] 
Add support for using custom keys in CARP parents

Add a new carp-key option to CARP parents, specifying what parts of an URL
to use in the parent selection algorithm.

14 years agoFix signed/unsigned comparison
Amos Jeffries [Sat, 30 Jul 2011 03:14:25 +0000 (15:14 +1200)] 
Fix signed/unsigned comparison

14 years agoSourceLayout: Basic auth: shuffle helper request functions
Amos Jeffries [Sat, 30 Jul 2011 01:34:25 +0000 (19:34 -0600)] 
SourceLayout: Basic auth: shuffle helper request functions

helper lookup functions are AuthBasicUserRequest members. Should be in
that classes .cc file.

Also merge submit and queue functions. no need to be separate.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 30 Jul 2011 00:12:59 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoSourceLayout: generic AnyP::ProtocolVersion tag class
Amos Jeffries [Fri, 29 Jul 2011 13:12:29 +0000 (07:12 -0600)] 
SourceLayout: generic AnyP::ProtocolVersion tag class

Protocol agnostic class to store the request-line version details.
HTTP/1.0, HTTP/1.1, ICY/1.0, WebSockets/1.0 etc

For patch reduction leaves HttpVersion as a child class for HTTP/*.* tags

14 years agoTypo in certificate_db.cc
Amos Jeffries [Fri, 29 Jul 2011 13:02:10 +0000 (01:02 +1200)] 
Typo in certificate_db.cc

14 years agoBug 2655: passing wrong the username to the url_rewrite_program
Oliver Dumschat [Fri, 29 Jul 2011 05:53:35 +0000 (23:53 -0600)] 
Bug 2655: passing wrong the username to the url_rewrite_program

14 years agoDebug enhancements for rewrite helper user
Amos Jeffries [Thu, 28 Jul 2011 13:01:05 +0000 (01:01 +1200)] 
Debug enhancements for rewrite helper user

14 years agoauthor: Alex Rousskov <rousskov@measurement-factory.com>
Christos Tsantilas [Thu, 28 Jul 2011 09:25:42 +0000 (12:25 +0300)] 
author: Alex Rousskov <rousskov@measurement-factory.com>
Bug 3138: squidclient mgr:objects/mgr:vm_objects never ends

14 years agoBug 3131:fd_table[fd].closing() assert from ConnStateData::noteMoreBodySpaceAvailable()
Alex Rousskov [Thu, 28 Jul 2011 06:04:55 +0000 (18:04 +1200)] 
Bug 3131:fd_table[fd].closing() assert from ConnStateData::noteMoreBodySpaceAvailable()

14 years agoicp clean-up and ipv6/ipv4 related fixes
Christos Tsantilas [Wed, 27 Jul 2011 13:38:06 +0000 (16:38 +0300)] 
icp clean-up and ipv6/ipv4 related fixes

- The  "Sender Host Address" field of the ICP messages header it is a 32bit
  integer so it can be only an ipv4 ip address. Moreover according the ICP RFC:

  "Sender Host Address
     The IPv4 address of the host sending the ICP message.  This field
     should probably not be trusted over what is  provided by getpeer-
     name(), accept(), and recvfrom().  There is some ambiguity over
     the original purpose of this field.  In practice it is not used."

  This patch set the "Sender Host Address" field always to 0.

- Remove the echo_hdr static variable from neighbors.cc file and the
  theIcpPublicHostID variables from the icp_v2.cc file. They are part of the
  old "source_ping" squid feature code which does not exist any more.

- Remove the theIcpPrivateHostID variable from the icp_v2.cc file. It was used
  only to set the "Sender Host Address" icp message header field.