]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 years agoInitial Large Rock and Collapsed Forwarding support.
Alex Rousskov [Wed, 1 Jan 2014 20:13:23 +0000 (13:13 -0700)] 
Initial Large Rock and Collapsed Forwarding support.

Large Rock: Support disk (and shared memory) caching of responses exceeding
one db slot (or one shared memory page) in size. A single db slot/page size is
still limited to 32KB (smaller values can be configured for disk caches using
the newly added cache_dir slot-size option). Removal of old rock cache dir
(followed by squid-z) is required -- the on-disk db structure has changed.

Collapsed Forwarding: Optionally merge concurrent cachable requests for the
same URI earlier: After the request headers have been parsed (as before), but
now _before_ the response headers have been received. Merging of requests
received by different SMP workers is supported. Controlled by the new
collapsed_forwarding directive in squid.conf. Disabled by default because all
but one of the merged requests have to be delayed (until the response headers
are received) for the merging to work, which may be worse than forwarding all
concurrent requests immediately. The overall feature idea and request
eligibility conditions are based on Collapsed Forwarding in Squid2.

Summary of other important changes (merged branch log contains the details):

* Tightened StoreEntry locking. Split StoreEntry::lock() into "just lock" and
  "update entry reference time" interfaces, addressing an old XXX.  Improved
  entry lock/unlock debugging. Needs more work.

* Adjusted StoreIOState::write() API to allow callers detect write errors.

* Simplified MemObject::write() API to remove an essentially unused callback.

* Mark client streams that sent everything as STREAM_COMPLETE. The old code
  used STREAM_UNPLANNED_COMPLETE if the completed stream was associated with a
  non-persistent connection, which did not make sense to me and, IIRC, led to
  store entry aborts even though the entries were not damaged in any way.

* mem_hdr::hasContigousContentRange() now returns true for empty ranges.

* Support "appending" ReadWriteLock state that can be shared by readers and
  the writer. The writer promises not to update key metadata (except growing
  object size and next pointers) and readers promise to be careful when
  reading growing slices.

* Fixed StoreEntry::mayStartSwapOut() logic to handle terminated swapouts.

* Improved STORE_MEM_CLIENT detection and documented known (and mostly old)
  StoreEntry::storeClientType() problems.

* Removed StoreEntry::hidden_mem_obj hack.

* Polished StoreEntry debugging to report more info, less noise. Use e: prefix.

* Added a script to extract store entry(ies) debugging from cache.log.

11 years agoAdded MemBlob::appended() method. Handy during out-of-band buffer manipulation.
Alex Rousskov [Wed, 1 Jan 2014 20:11:16 +0000 (13:11 -0700)] 
Added MemBlob::appended() method. Handy during out-of-band buffer manipulation.

11 years agoMerged from trunk 13199.
Alex Rousskov [Wed, 1 Jan 2014 19:20:49 +0000 (12:20 -0700)] 
Merged from trunk 13199.

11 years agoRemoved stale copy-pasted boilerplate.
Alex Rousskov [Wed, 1 Jan 2014 17:51:10 +0000 (10:51 -0700)] 
Removed stale copy-pasted boilerplate.

11 years agoSourceFormat Enforcement
Alex Rousskov [Tue, 31 Dec 2013 18:49:41 +0000 (11:49 -0700)] 
SourceFormat Enforcement

11 years agoPolishing touches to address PREVIEW review concerns dated 2013/07/03.
Alex Rousskov [Tue, 31 Dec 2013 18:09:24 +0000 (11:09 -0700)] 
Polishing touches to address PREVIEW review concerns dated 2013/07/03.

11 years agoDo not use HERE in new or changed debugs() statements.
Alex Rousskov [Mon, 30 Dec 2013 23:58:33 +0000 (16:58 -0700)] 
Do not use HERE in new or changed debugs() statements.

Polished StoreEntry creation/destruction debugging.

11 years agoPrep for 3.4.2
Amos Jeffries [Mon, 30 Dec 2013 10:48:15 +0000 (03:48 -0700)] 
Prep for 3.4.2

11 years agoBug 3498: FTP PUT assertion Server.cc:246: "r->body_pipe != NULL"
Alex Rousskov [Sun, 29 Dec 2013 15:56:02 +0000 (07:56 -0800)] 
Bug 3498: FTP PUT assertion Server.cc:246: "r->body_pipe != NULL"

11 years agoMade test-builds.sh happy by adding missing stubs and adjusting existing ones.
Alex Rousskov [Sun, 29 Dec 2013 05:30:26 +0000 (22:30 -0700)] 
Made test-builds.sh happy by adding missing stubs and adjusting existing ones.

11 years agoUpdated tests/testRock and the store rebuild stubs it needs.
Alex Rousskov [Fri, 27 Dec 2013 18:37:26 +0000 (11:37 -0700)] 
Updated tests/testRock and the store rebuild stubs it needs.
Synced tests/testUfs after updating the store rebuild stubs.

Store uses StoreController::store_dirs_rebuilding to decide whether the entry
release should be delayed. Thus, storeRebuildComplete() must update it. Also
synced the corresponding CPPUNIT_ASSERT_EQUAL() statements to expect a zero
value after the rebuild is completed.

Do not create an entry just to get its key: Creating forces a public key which
necessarily invalidates the previously cached entry with the same key, if any.

Unlock unused entries. This helps with their release later (and adds more
realism to the test case).

Fixed entry #5 test case to account for the fact that creating a second entry
with the same public key invalidates the first entry.

Release instead of just unlinking entries. StoreEntry::release() is the public
interface which updates internal tables as needed. StoreEntry::unlink() is an
internal call for updating the disk cache-related state; it does not update
the the in-transit index.

11 years agoCheck that StoreEntry lock does not go negative
Alex Rousskov [Fri, 27 Dec 2013 18:34:41 +0000 (11:34 -0700)] 
Check that StoreEntry lock does not go negative
which may happen if unlocked (and possibly deleted) entry is unlocked (again).

11 years agoBug 3806: Caching responses with Vary header
Alex Rousskov [Mon, 23 Dec 2013 05:26:23 +0000 (22:26 -0700)] 
Bug 3806: Caching responses with Vary header

Various fixes making Vary caching work better.
More work is needed to re-enable shared memory caching of Vary responses.

bag5s r12741: Do not start storing the vary marker object until its key becomes public.
bag5s r12742: Log failed (due to "Vary object loop" or "URL mismatch") hits as TCP_MISSes.
bag5s r12743: Refuse to cache Vary-controlled objects in shared memory (for now).

Based on trunk r13179.

11 years agoBug 3985: 60s limit introduced by balance_on_multiple_ip breaks bad IP recovery
Jakob Bohm [Sat, 21 Dec 2013 17:31:59 +0000 (09:31 -0800)] 
Bug 3985: 60s limit introduced by balance_on_multiple_ip breaks bad IP recovery

Alternative fix if necessary would be to calculate a dynamic timeout
value based on number and timeouts for connections and forwarding.

However, as noted in the bug report the address markings are reset every
TTL when the stored RR are replaced. This meets the criteria for periodic
retries of marked-BAD IPs. Also if all IPs are marked BAD they all get
un-marked and retried. So for now just remove the TTL hack.

11 years agoFix \-unescaping in quoted strings from helpers
Amos Jeffries [Sat, 21 Dec 2013 04:54:54 +0000 (20:54 -0800)] 
Fix \-unescaping in quoted strings from helpers

strwordtok() was unescaping '\' values in unquoted tokens. This causes
problems with NTLM helper response user\DOMAIN values which are sent as
a un-quoted un-escaped value.

Restrict un-escaping of '\' to only occur when inside "quoted" words.

11 years agoWCCPv2: fix assertion 'Cannot convert non-IPv4 to IPv4' on FreeBSD
Amos Jeffries [Fri, 20 Dec 2013 11:34:44 +0000 (03:34 -0800)] 
WCCPv2: fix assertion 'Cannot convert non-IPv4 to IPv4' on FreeBSD

FreeBSD does not set the from-address on recv() if there was an error
reading the packet. This can result in Ip::Address assertion if the
error is not checked for before the IP address is mapped into Squid
internal format.

11 years agoFix missing cast in rev.13162
Amos Jeffries [Fri, 20 Dec 2013 05:55:43 +0000 (22:55 -0700)] 
Fix missing cast in rev.13162

11 years agoMade "make check" happier by syncing test case with Store API changes
Alex Rousskov [Thu, 19 Dec 2013 23:13:24 +0000 (16:13 -0700)] 
Made "make check" happier by syncing test case with Store API changes
and making StoreEntry::hashDelete() more forgiving.

11 years agoAdded missing header in client_side_reply.cc for clang
Francesco Chemolli [Thu, 19 Dec 2013 13:47:27 +0000 (14:47 +0100)] 
Added missing header in client_side_reply.cc for clang

11 years agoAdd missing StoreEntry::lock() parameters, require unlock() parameter,
Alex Rousskov [Thu, 19 Dec 2013 04:53:35 +0000 (21:53 -0700)] 
Add missing StoreEntry::lock() parameters, require unlock() parameter,
and polish un/lock() context debugging.

11 years agoFix missing include in rev.13190
Amos Jeffries [Thu, 19 Dec 2013 00:55:46 +0000 (17:55 -0700)] 
Fix missing include in rev.13190

11 years agoAdded StoreEntry::lock() call dropped when merging from trunk r13172.
Alex Rousskov [Wed, 18 Dec 2013 22:32:14 +0000 (15:32 -0700)] 
Added StoreEntry::lock() call dropped when merging from trunk r13172.

11 years agoRename SBuf::find_first_of and find_first_not_of to camelCase.
Francesco Chemolli [Wed, 18 Dec 2013 17:53:43 +0000 (18:53 +0100)] 
Rename SBuf::find_first_of and find_first_not_of to camelCase.

11 years agoAdded send_hit and store_miss squid.conf directives
Alex Rousskov [Wed, 18 Dec 2013 17:19:00 +0000 (10:19 -0700)] 
Added send_hit and store_miss squid.conf directives
to control caching of responses using response info.

The existing "cache" directive is checked before Squid has access to the
response and, hence, could not use response-based ACLs such as http_status.
Response-based ACLs may be essential when fine-tuning caching. Squid Bug 3937
(StoreID can lead to 302 infinite loop) is a good use case.

Updated old "cache" directive documentation to provide more information, to
help folks distinguish the three related directives, and to polish for
clarity.

TODO: Support lookup_hit and possibly deprecate/remove "cache".

11 years agoMerge CharacterSet
Francesco Chemolli [Wed, 18 Dec 2013 17:03:15 +0000 (18:03 +0100)] 
Merge CharacterSet

11 years agoReverted buggy change on CharacterSet::operator+=, documentation touches
Francesco Chemolli [Wed, 18 Dec 2013 15:22:06 +0000 (16:22 +0100)] 
Reverted buggy change on CharacterSet::operator+=, documentation touches

11 years agoMerged from trunk
Francesco Chemolli [Wed, 18 Dec 2013 14:07:05 +0000 (15:07 +0100)] 
Merged from trunk

11 years agoAdd unit tests for method parsing update
Amos Jeffries [Wed, 18 Dec 2013 03:00:01 +0000 (19:00 -0800)] 
Add unit tests for method parsing update

11 years agoFix missing include in rev.13186
Amos Jeffries [Wed, 18 Dec 2013 00:48:33 +0000 (16:48 -0800)] 
Fix missing include in rev.13186

11 years agoImproved CharacterSet documentation.
Francesco Chemolli [Tue, 17 Dec 2013 17:28:53 +0000 (18:28 +0100)] 
Improved CharacterSet documentation.

11 years agoMerged from trunk
Francesco Chemolli [Tue, 17 Dec 2013 17:05:17 +0000 (18:05 +0100)] 
Merged from trunk

11 years agoUsing std::copy_if for CharacterSet::operator +=
Francesco Chemolli [Tue, 17 Dec 2013 17:02:51 +0000 (18:02 +0100)] 
Using std::copy_if for CharacterSet::operator +=

11 years agoClarified documentatio for CharacterSet; moved CharacterSet::add and constructor...
Francesco Chemolli [Tue, 17 Dec 2013 15:58:52 +0000 (16:58 +0100)] 
Clarified documentatio for CharacterSet; moved CharacterSet::add and constructor to .cc file

11 years agoMove CharacterSet::operator += to .cc file; change SBuf::find_first_not_of to match STL
Francesco Chemolli [Tue, 17 Dec 2013 10:19:44 +0000 (11:19 +0100)] 
Move CharacterSet::operator += to .cc file; change SBuf::find_first_not_of to match STL

11 years agoHTTP/1.1: method names are case-sensitive
Amos Jeffries [Tue, 17 Dec 2013 09:16:51 +0000 (02:16 -0700)] 
HTTP/1.1: method names are case-sensitive

RFC 2616 states that method names are case sensitive, but the Squid
parser has been accepting them case-insensitive.

Enforce case-sensitive behaviour when performing strict HTTP parse.

NOTE: avoid HTTP_VIOLATIONS since there is no normative MUST/SHOULD
involved in the specification texts.

11 years agoBug 3980: FATAL ERROR due to max_user_ip -s option
Christos Tsantilas [Tue, 17 Dec 2013 07:12:55 +0000 (00:12 -0700)] 
Bug 3980: FATAL ERROR due to max_user_ip -s option

11 years agoMoved CharacterSet's backing storage to std::vector<uint8_t> to gain speed at the...
Francesco Chemolli [Mon, 16 Dec 2013 21:58:50 +0000 (22:58 +0100)] 
Moved CharacterSet's backing storage to std::vector<uint8_t> to gain speed at the expense of space.
Improved CharacterSet's constructor
Made CharacterSet's name parameter optional with default value.

11 years agoMoved CharacterSet as forward-declaration in SBuf.h
Francesco Chemolli [Sun, 15 Dec 2013 12:48:01 +0000 (13:48 +0100)] 
Moved CharacterSet as forward-declaration in SBuf.h

11 years agoImplemented CharacterSet-based SBuf::find_first_of and find_first_not_of
Francesco Chemolli [Sun, 15 Dec 2013 11:47:07 +0000 (12:47 +0100)] 
Implemented CharacterSet-based SBuf::find_first_of and find_first_not_of

11 years agoSilence SBufDetailedStats stubs
Francesco Chemolli [Sun, 15 Dec 2013 09:28:50 +0000 (10:28 +0100)] 
Silence SBufDetailedStats stubs

11 years agoMerge SBufList
Francesco Chemolli [Sun, 15 Dec 2013 09:28:18 +0000 (10:28 +0100)] 
Merge SBufList

11 years agoClarified comment in SBufAlgos.h, improved coding standards adherence
Francesco Chemolli [Sat, 14 Dec 2013 15:58:04 +0000 (16:58 +0100)] 
Clarified comment in SBufAlgos.h, improved coding standards adherence

11 years agoFix linker errors "relocation R_X86_64_32 against .rodata"
Amos Jeffries [Thu, 12 Dec 2013 09:41:39 +0000 (01:41 -0800)] 
Fix linker errors "relocation R_X86_64_32 against .rodata"

... "can not be used when making a shared object; recompile with -fPIC"

Caused by some libraries built without libtool in certain environments.
NP: there are other libraries in Squid built without libtool but they
    appear not to be having these linker issues at this time.

Also, fixes "undefined symbol eui64_aton" uncovered by these changes.

11 years agoRegression in URL helper API
Amos Jeffries [Wed, 11 Dec 2013 11:12:43 +0000 (03:12 -0800)] 
Regression in URL helper API

The backward compatibility logics in redirect.cc are not working as
intended on redirection URLs due to the presence of '=' in the URL and
how the key=value name parsing is performed.

A typical redirection URL looks like:
  http://example.com/?url=http://www.example.net/

and 3.4 has a parser that splits tokens at '=' unconditionally and then
passes the bits as a key and value to the redirector logics which
complains that it does not understand the answer of the URL redirector.
Or treats is an an unknown key=value with no redirection URL.

Either case is handled as a no-redirection result from the helper.

This limits the key names to alphanumeric, hyphen and underscore
characters. Valid URL responses contain characters outside this set and
should no longer be interpreted as keys regardless of the '=' character.

11 years agoFix missing test stub in rev.13178
Amos Jeffries [Wed, 11 Dec 2013 23:41:49 +0000 (12:41 +1300)] 
Fix missing test stub in rev.13178

11 years agoBug 3806: Caching responses with Vary header
Alex Rousskov [Wed, 11 Dec 2013 22:44:59 +0000 (11:44 +1300)] 
Bug 3806: Caching responses with Vary header

11 years agoSet sslcrtvalidator_children concurrency option default value to 1
Christos Tsantilas [Wed, 11 Dec 2013 21:50:06 +0000 (23:50 +0200)] 
Set sslcrtvalidator_children concurrency option default value to 1

11 years ago%tS logformat code, part3
Christos Tsantilas [Mon, 9 Dec 2013 16:54:56 +0000 (18:54 +0200)] 
%tS logformat code, part3

Fix build when GCC 4,4.3 used

11 years agoPrep for 3.4.1
Amos Jeffries [Mon, 9 Dec 2013 01:17:53 +0000 (18:17 -0700)] 
Prep for 3.4.1

11 years agoRelease notes: spotlight key_extras feature
Amos Jeffries [Mon, 9 Dec 2013 01:11:47 +0000 (18:11 -0700)] 
Release notes: spotlight key_extras feature

11 years agoRelease Notes for Squid-3.5
Amos Jeffries [Sat, 7 Dec 2013 07:49:29 +0000 (00:49 -0700)] 
Release Notes for Squid-3.5

11 years agoFix 3.4 Release Notes typo
Amos Jeffries [Sat, 7 Dec 2013 07:49:05 +0000 (00:49 -0700)] 
Fix 3.4 Release Notes typo

11 years agoMerged from trunk 13172.
Alex Rousskov [Fri, 6 Dec 2013 23:52:26 +0000 (16:52 -0700)] 
Merged from trunk 13172.

11 years agoAdd key_extras to proxy authentication schemes.
Christos Tsantilas [Fri, 6 Dec 2013 14:59:47 +0000 (16:59 +0200)] 
Add key_extras to proxy authentication schemes.

The key_extras value is a "quoted string" with logformat %macro support. It is
appended to request line for the authentication helper.

Example usage:
   auth_param basic key_extras "thePort:%>lp"
   auth_param digest key_extras "LocalIP=%>la:%lp"

This is a Measurement Factory project.

11 years ago%tS logformat code, part2
Christos Tsantilas [Fri, 6 Dec 2013 11:09:50 +0000 (13:09 +0200)] 
%tS logformat code, part2

Fix build on 3.HEAD-amd64-CentOs-icc

11 years agoFixed formatting
Francesco Chemolli [Thu, 5 Dec 2013 15:26:22 +0000 (16:26 +0100)] 
Fixed formatting
Moved ToSBufList from SBufList.h/cc to wordlist.h/cc
Fixed some misnamed parameters in SBufAlgos.h

11 years ago%tS logformat code
Christos Tsantilas [Thu, 5 Dec 2013 11:04:45 +0000 (13:04 +0200)] 
%tS logformat code

This patch add the %tS logformat code to represent master transaction start time
in <seconds>.<milliseconds> format, similar to the existing access.log "current
time" field (%ts.%03tu).

Also allow formated values for adaptation_meta values.

This is a Measurement Factory project

11 years agoAdded missing header in SBufAlgos.h
Francesco Chemolli [Thu, 5 Dec 2013 09:31:09 +0000 (10:31 +0100)] 
Added missing header in SBufAlgos.h

11 years agoPrep for SBufList merge from stringng
Francesco Chemolli [Wed, 4 Dec 2013 18:37:08 +0000 (19:37 +0100)] 
Prep for SBufList merge from stringng

11 years agoBug 3589: intercepted and ICAP modified request using a cache_peer
Amos Jeffries [Wed, 4 Dec 2013 00:57:34 +0000 (13:57 +1300)] 
Bug 3589: intercepted and ICAP modified request using a cache_peer

11 years agoRemoved spurious source files from src/icmp/Makefile.am
Francesco Chemolli [Tue, 3 Dec 2013 07:49:13 +0000 (08:49 +0100)] 
Removed spurious source files from src/icmp/Makefile.am

11 years agoBug 3935: Invalid pointer dereference when peeking at origin server certificate
Christos Tsantilas [Mon, 2 Dec 2013 18:33:26 +0000 (20:33 +0200)] 
Bug 3935: Invalid pointer dereference when peeking at origin server certificate

We must check request->clientConnectionManager pointer for validity before
dereferencing it.

This is a Measurement Factory project

11 years agoDocumented that ACLs should be refcounted.
Alex Rousskov [Mon, 2 Dec 2013 00:36:24 +0000 (17:36 -0700)] 
Documented that ACLs should be refcounted.

Refcounting would avoid ACL destruction problems (when some ACLs use other
ACLs or when an ACL goes async during reconfigure) and may even reduce
problems with AclMatchedName.

11 years agoDestroy ACLs in the reverse order of creation to avoid destruction segfaults
Alex Rousskov [Mon, 2 Dec 2013 00:35:50 +0000 (17:35 -0700)] 
Destroy ACLs in the reverse order of creation to avoid destruction segfaults
during reconfiguration.

Group ACLs created later may use other ACLs created earlier. A group ACL must
be deleted first so that its AclDeleter can safely access registration status
(and avoid double deletion) of the ACLs it uses. Since ACLs are remembered (in
Config.aclList) using a singly-linked list, it is difficult to change their
deletion order.  Instead, we change their listing order from FIFO to LIFO.

11 years agoPortability: sleep() is sometimes a macro
Amos Jeffries [Sun, 1 Dec 2013 08:02:49 +0000 (01:02 -0700)] 
Portability: sleep() is sometimes a macro

sleep() is sometimes defined as a macro. Such as in Squid compat library.
Use another name for the sleep starting method in class Ipc::UdsOp

  This is an iCelero Project

11 years agoWindows: fix compile errors in WinSvc.cc
Amos Jeffries [Sun, 1 Dec 2013 07:37:53 +0000 (00:37 -0700)] 
Windows: fix compile errors in WinSvc.cc

Fix defined by unused symbol errors in WinSvc.cc

Also, set the service error mode to prevent Windows Error Reporting
dialog boxes appearing.

  This is an iCelero Project

11 years agoPortability: std::string:npos is not always appropriate for String::npos
Amos Jeffries [Sun, 1 Dec 2013 07:24:58 +0000 (00:24 -0700)] 
Portability: std::string:npos is not always appropriate for String::npos

On some systems such as Windows MinGW the signed/unsigned property of
std::string::npos does not match up with the Squdi String class size_type
signed/unsigned property. Resulting in compiler signed vs unsigned
mismatch errors when compiling.

  This is an iCelero project.

11 years agoPortability: refresh_pattern requires regex
Amos Jeffries [Sun, 1 Dec 2013 07:12:31 +0000 (00:12 -0700)] 
Portability: refresh_pattern requires regex

The GnuRegex portability wrapper is required explicitly by
RefreshPattern.h on some systems which do not include regex.h implicitly
via other paths.

  This is an iCelero project

11 years agolibrfcnb: portability fixes
Amos Jeffries [Sun, 1 Dec 2013 07:00:43 +0000 (00:00 -0700)] 
librfcnb: portability fixes

Add #include wrapper protection for headers missing on Windows MinGW.

  This is an iCelero Project

11 years agoOpenBSD portability fix in DiskThreads
Francesco Chemolli [Sat, 30 Nov 2013 22:18:16 +0000 (23:18 +0100)] 
OpenBSD portability fix in DiskThreads

11 years agoPrep for 3.3.11 and 3.4.0.3
Amos Jeffries [Sat, 30 Nov 2013 13:11:42 +0000 (06:11 -0700)] 
Prep for 3.3.11 and 3.4.0.3

11 years agoProtect aclIsProxyAuth() debugging from NULL names (via NULL AclMatchedName).
Nathan Hoad [Fri, 29 Nov 2013 23:44:28 +0000 (16:44 -0700)] 
Protect aclIsProxyAuth() debugging from NULL names (via NULL AclMatchedName).

Related to Bug 3972 fix in r13156.

11 years agoBug 3972: Segfault when getting the deny info page ID after a reconfigure
Nathan Hoad [Fri, 29 Nov 2013 23:26:03 +0000 (16:26 -0700)] 
Bug 3972: Segfault when getting the deny info page ID after a reconfigure

Older ACL code was using a stale AclMatchedName value. More recent code resets
the AclMatchedName global to NULL to avoid leaking the stale value, but that
may crash strcmp() in aclGetDenyInfoPage(). Long-term, the global should be
removed, of course.

11 years agoSupport libecap v1.0, allowing asynchronous adapters and eCAP version checks.
Alex Rousskov [Fri, 29 Nov 2013 19:47:54 +0000 (12:47 -0700)] 
Support libecap v1.0, allowing asynchronous adapters and eCAP version checks.

After these changes, Squid can support eCAP adapters built with libecap v1.0,
but stops supporting adapters built with earlier libecap versions (due to API
changes). The new libecap version allows Squid to better check the version of
the eCAP adapter being loaded as well as the version of the eCAP library being
used. This should help with migration to libecap v1.0.

Expose [running] main event loop as a global so that modules can add engines.

11 years agoAdded missing stub_lipbicmp.cc to testUfs
Francesco Chemolli [Fri, 29 Nov 2013 08:19:40 +0000 (09:19 +0100)] 
Added missing stub_lipbicmp.cc to testUfs

11 years agoReceive annotations from external ACL helpers
Amos Jeffries [Fri, 29 Nov 2013 04:41:07 +0000 (21:41 -0700)] 
Receive annotations from external ACL helpers

This completes the annotation support for common helper interfaces by
making custom key=value pairs sent by external ACL helpers in to
NotePair objects and attaching to the active request.

The other side of this - sending values to the helper is deferred until
the helper format can be converted to logformat codes.

11 years agoAdd missing ipcache.cc stub in testUfs
Francesco Chemolli [Thu, 28 Nov 2013 16:50:49 +0000 (17:50 +0100)] 
Add missing ipcache.cc stub in testUfs

11 years agoImplement SBuf and MemBlob size distribution stats
Francesco Chemolli [Wed, 27 Nov 2013 15:52:03 +0000 (16:52 +0100)] 
Implement SBuf and MemBlob size distribution stats

11 years agoCleanup: convert helper allocation from cbdataAlloc to new
Amos Jeffries [Wed, 27 Nov 2013 00:37:24 +0000 (13:37 +1300)] 
Cleanup: convert helper allocation from cbdataAlloc to new

The helper_server and helper_stateful_server classes are already
CBDATA_CLASS2 defined classes with new/delete operators and the free
operation already handled by delete(). However teh allocation was not
using new() and thus not calling the class constructors properly.

11 years agoDrop obsolete class StringArea
Amos Jeffries [Tue, 26 Nov 2013 09:43:29 +0000 (02:43 -0700)] 
Drop obsolete class StringArea

class StringArea was always intended to only be a temporary measure
before SBuf was completed and merged. That has now happened.

11 years agoBug 3782: Digest authentication not obeying nonce_max_count
Frederic Bourgeois [Thu, 21 Nov 2013 23:58:59 +0000 (15:58 -0800)] 
Bug 3782: Digest authentication not obeying nonce_max_count

11 years agoFix other issues in rev.13143
Amos Jeffries [Sat, 23 Nov 2013 05:21:34 +0000 (22:21 -0700)] 
Fix other issues in rev.13143

11 years agoFix const-correctness in rev.13143
Amos Jeffries [Thu, 21 Nov 2013 13:05:47 +0000 (05:05 -0800)] 
Fix const-correctness in rev.13143

11 years agoMissing include from rev.13143
Amos Jeffries [Sat, 23 Nov 2013 01:40:38 +0000 (18:40 -0700)] 
Missing include from rev.13143

11 years agoBug 3970: max_filedescriptors disabled due to missing setrlimit
Amos Jeffries [Sat, 23 Nov 2013 01:28:52 +0000 (18:28 -0700)] 
Bug 3970: max_filedescriptors disabled due to missing setrlimit

11 years agoRemove many uses of String::defined()
Amos Jeffries [Sat, 23 Nov 2013 00:58:42 +0000 (13:58 +1300)] 
Remove many uses of String::defined()

Making it private to String:: so that we can easier avoid dealing with
NULL buffer vs "" problems in future.

11 years agoSource Maintenance: move 3.HEAD snapshot build to website scripts
Automatic source maintenance [Thu, 21 Nov 2013 22:12:03 +0000 (15:12 -0700)] 
Source Maintenance: move 3.HEAD snapshot build to website scripts

11 years agoBug 3967: ipc/Kid.cc compilation failure: 'time' was not declared in this scope
Thomas De Schampheleire [Thu, 21 Nov 2013 15:36:36 +0000 (08:36 -0700)] 
Bug 3967: ipc/Kid.cc compilation failure: 'time' was not declared in this scope

Function time() comes from <time.h>, so add the necessary #include.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 19 Nov 2013 01:12:54 +0000 (18:12 -0700)] 
SourceFormat Enforcement

11 years agoUse CPPUNIT_ASSERT_EQUAL wherever it makes sense in unit tests
Francesco Chemolli [Mon, 18 Nov 2013 17:03:55 +0000 (18:03 +0100)] 
Use CPPUNIT_ASSERT_EQUAL wherever it makes sense in unit tests

11 years agoRe-compute Range response content offset after an FTP response was adapted.
Alex Rousskov [Mon, 18 Nov 2013 15:55:05 +0000 (08:55 -0700)] 
Re-compute Range response content offset after an FTP response was adapted.

Moved HTTP-only offset calculation code to the general ServerStateData code so
that [converted-to-HTTP] FTP responses can use it. FTP code computes the range
offset on its own earlier, but we must REcalculate in case the response is
adapted into a response with a different (or no) content range.

11 years agoBug 3960: Dead Peers Are Not Revived
Amos Jeffries [Mon, 18 Nov 2013 11:40:56 +0000 (04:40 -0700)] 
Bug 3960: Dead Peers Are Not Revived

11 years agoWindows: Fix aclocal "is already registered" errors
Amos Jeffries [Sat, 16 Nov 2013 13:19:28 +0000 (06:19 -0700)] 
Windows: Fix aclocal "is already registered" errors

aclocal on Windows cannot handle line-wrapping \ characters and leaves
them present in the output m4 code. in side AC_CONFIG_FILES macro this
results in a mystery file '\\r' being 'registered'.

The list of Makefiles does not even need ths line-wrap indicator as
demonstrated by the tools/Makefile missing its one for some time without
problems.

 This is an iCelero Inc sponsored fix.

11 years agoWindows: Ensure array index is an integer in C code
Amos Jeffries [Sat, 16 Nov 2013 12:42:10 +0000 (01:42 +1300)] 
Windows: Ensure array index is an integer in C code

MSVC compiler does not accet non-integer types for array indexes so we
must cast these CHAR index values to int before use.

 This is an iCelero Inc sponsored fix.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 16 Nov 2013 01:14:32 +0000 (18:14 -0700)] 
SourceFormat Enforcement

11 years agoReverted to using mem.cc for testSBuf
Francesco Chemolli [Fri, 15 Nov 2013 16:56:59 +0000 (17:56 +0100)] 
Reverted to using mem.cc for testSBuf

11 years agoImproved stubs for mem.cc and made wider use of them
Francesco Chemolli [Fri, 15 Nov 2013 09:16:26 +0000 (10:16 +0100)] 
Improved stubs for mem.cc and made wider use of them

11 years agoMerged from trunk
Francesco Chemolli [Fri, 15 Nov 2013 09:14:52 +0000 (10:14 +0100)] 
Merged from trunk

11 years agoMade use of stub_mem.cc
Francesco Chemolli [Wed, 13 Nov 2013 17:30:54 +0000 (18:30 +0100)] 
Made use of stub_mem.cc

11 years agoBug 3956: xstrndup: tried to dup a NULL pointer
Frederic Bourgeois [Wed, 13 Nov 2013 10:53:49 +0000 (03:53 -0700)] 
Bug 3956: xstrndup: tried to dup a NULL pointer