]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 years agoDocumented a known bug that took a while to triage. No good fix is available.
Alex Rousskov [Wed, 25 Jun 2014 23:21:28 +0000 (17:21 -0600)] 
Documented a known bug that took a while to triage. No good fix is available.

11 years agoPrep for 3.4.6
Amos Jeffries [Wed, 25 Jun 2014 12:07:37 +0000 (05:07 -0700)] 
Prep for 3.4.6

11 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 25 Jun 2014 00:14:36 +0000 (18:14 -0600)] 
SourceFormat Enforcement

11 years agoSupport more collapsed forwarding hit cases:
Alex Rousskov [Wed, 25 Jun 2014 00:09:35 +0000 (18:09 -0600)] 
Support more collapsed forwarding hit cases:

Allow STORE_MEMORY_CLIENTs to open disk files if needed and possible.
STORE_*_CLIENT designation is rather buggy (several known XXXs). Some
collapsed clients are marked as STORE_MEMORY_CLIENTs (for the lack of info at
determination time) but their hit content may actually come from a disk cache.

Do not abandon writing a collapsed cache entry when we cannot cache the entry
in RAM if the entry can be cached on disk instead. Both shared memory cache
and the disk cache have to refuse to cache the entry for it to become
non-collapsible. This dual refusal is difficult to detect because each cache
may make the caching decision at different times. Added StoreEntry methods to
track those decisions and react to them.

Recognize disk cache as a potential source of the collapsed entry when the
memory cache is configured. While collapsed entries would normally be found in
the shared memory cache, caching policies and other factors may prohibit
memory caching but still allow disk caching. Memory cache is still preferred.

11 years agoDo not use unknown entry size in StoreEntry::checkTooSmall() determination.
Alex Rousskov [Wed, 25 Jun 2014 00:07:41 +0000 (18:07 -0600)] 
Do not use unknown entry size in StoreEntry::checkTooSmall() determination.

The size of collapsed entries is often unknown, even when they are STORE_OK
(because swap_hdr_sz is unknown when the other worker has created the cache
entry).  The same code has been using this ignore-unknowns logic for the
Content-Length header value, so the rejection of unknown entry size (added as
a part of C++ conversion without a dedicated message in r5766) could have been
a typo.

11 years agoRock and shared memory caches fixes/improvements.
Alex Rousskov [Tue, 24 Jun 2014 23:48:37 +0000 (17:48 -0600)] 
Rock and shared memory caches fixes/improvements.

* Bug fixes:

Avoid "FATAL: Squid has attempted to read data from memory that is not
present" crashes. Improve related code.

Lifted 16777216 slot limit from rock cache_dirs and shared memory caches.
Caches larger than 256GB (assuming default 16KB cache_dir slot-size) require
this fix to use disk space beyond 256GB.  Also fixed rock disk space waste
warning.

Restored Squid ability to cache (in memory) when no disk caches are configured
which was lost during r12662 "Bug 3686: cache_dir max-size default fails" but
other bugs hid this problem.

Allow HITs on entries backed by a shared memory cache only.

Avoid store_client.cc "entry->swap_filen > -1 || entry->swappingOut()" asserts.

Make sure Squid dumps core and not just promises one when memory management
goes wrong.

* Significant RAM usage reduction:

Significantly reduced Large Rock (and slightly shared memory) RAM requirements
by not allocating 40 (and 12) bytes of unused RAM per cache slot.

Stop wasting 96 RAM bytes per slot for high-offset slots in large shared
caches with more than 16777216 slots. For example, a StoreMap for a 1TB shared
cache with default 16KB slot sizes (67108864 slots) occupied about 6.5GB of
RAM. After this change, the same information is stored in about 2.0GB because
unused anchors are not stored.

* Other improvements:

Document counter-intuitive round-robin cache_dir selection; decrease its bias.

Report IpcIo file name with errors and warnings to inform admin which
cache_dir needs troubleshooting or tuning.

11 years agoMerged from trunk r13474.
Alex Rousskov [Tue, 24 Jun 2014 22:52:53 +0000 (16:52 -0600)] 
Merged from trunk r13474.

11 years agoPrep for merge from trunk: undo branch r13313, r13312, and r13311 that were
Alex Rousskov [Tue, 24 Jun 2014 22:21:48 +0000 (16:21 -0600)] 
Prep for merge from trunk: undo branch r13313, r13312, and r13311 that were
temporary undoing trunk r13266, r13269, and r13270 (std::vector migration).

11 years agoEnable ICAP client by default
Amos Jeffries [Sun, 22 Jun 2014 07:05:08 +0000 (00:05 -0700)] 
Enable ICAP client by default

This component of Squid has been relatively stable now for several
series.

11 years agoBug 4073 partial: 3.4 fails to compile on cygwin
Amos Jeffries [Sun, 22 Jun 2014 03:33:30 +0000 (20:33 -0700)] 
Bug 4073 partial: 3.4 fails to compile on cygwin

11 years agoRFC 7239 registers Forwarded header
Amos Jeffries [Sat, 21 Jun 2014 15:52:55 +0000 (08:52 -0700)] 
RFC 7239 registers Forwarded header

This heade obsoletes X-forwarded-For and many other X-* headers.

For now we do nothing special with it except statistics gathering.
Future work will remove X-Forwarded-For support.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 18 Jun 2014 00:14:50 +0000 (18:14 -0600)] 
SourceFormat Enforcement

11 years agoNon https connectiona on SSL-bump enabled port may stuck
Christos Tsantilas [Tue, 17 Jun 2014 14:54:53 +0000 (17:54 +0300)] 
Non https connectiona on SSL-bump enabled port may stuck

This is can be seen on skype when try to connect to server using an
SSL-bump enabled squid port. Squid try to bump the connection, waiting for ever
the ssl protocol header, and skype client waits for ever  an answer from the
server.

This patch sets the timeout to Config.Timeout.request (request_timeout)

This is a Measurement Factory project

11 years agoDo not leak implicit ACLs during reconfigure.
Alex Rousskov [Mon, 16 Jun 2014 22:50:08 +0000 (16:50 -0600)] 
Do not leak implicit ACLs during reconfigure.

Many ACLs implicitly created by Squid when grouping multiple ACLs were not
destroyed because those implicit ACLs where not covered by the global ACL
registry used for ACL destruction.

See also: r13210 which did not go far enough because it incorrectly assumed
that all InnerNode() children are aclRegister()ed and, hence, will be
centrally freed.

Also, do not use cbdataFree() on non-POD Acl::Tree objects that have
destructors.

TODO: Refcount all ACLs instead.

11 years agoFix build on some 32bit systems with strtoll()
Alex Rousskov [Mon, 16 Jun 2014 22:45:23 +0000 (16:45 -0600)] 
Fix build on some 32bit systems with strtoll()
broken by r13429 that duplicated unportable portability code.

GCC exits with errors: integer constant is too large for 'long' type

nnnL constants are "long" and cannot hold 64bit integers on 32bit platforms.
Use LL suffix for 64bit constants for now. It remains to be seen how portable
that LL C++ extension is: https://gcc.gnu.org/onlinedocs/gcc/Long-Long.html

Also fixed INT64_MIN #define (missing parenthesis).

11 years agofix rev.13465 "LruMap::memLimit_" patch to compile with clang
Christos Tsantilas [Mon, 16 Jun 2014 19:58:50 +0000 (22:58 +0300)] 
fix rev.13465 "LruMap::memLimit_" patch to compile with clang

11 years agoexternal_acl_type documentation lies for cache=n option
Christos Tsantilas [Mon, 16 Jun 2014 16:21:19 +0000 (19:21 +0300)] 
external_acl_type documentation lies for cache=n option

The default cache size for external_acl_type is 256*1024 not unbounded as
documentation says.

11 years agoAssure that when LruMap::memLimit_ is set to 0 no entries stored on LruMap
Christos Tsantilas [Mon, 16 Jun 2014 16:16:10 +0000 (19:16 +0300)] 
Assure that when LruMap::memLimit_ is set to 0 no entries stored on LruMap

Changes:
 - Do not add new entries to LruMap if memLimit is 0
 - Remove all entries in LruMap::trim if memLimit set to 0

11 years agoPOrtability: use 64-bit for X-Cache-Age header
Amos Jeffries [Sat, 14 Jun 2014 01:45:50 +0000 (18:45 -0700)] 
POrtability: use 64-bit for X-Cache-Age header

While the value is expected to be well within 32-bit range some OS
(OpenBSD 5.5 at least) use 64-bit time_t. Use the larger type size for
calculations which also removes 32-bit wrap errors, and cast for older
systems.

11 years agoFixed bug in CharacterSet::addRange()
Francesco Chemolli [Wed, 11 Jun 2014 10:31:56 +0000 (12:31 +0200)] 
Fixed bug in CharacterSet::addRange()

11 years agoComplete ConnOpener::connect change from r13459
Francesco Chemolli [Wed, 11 Jun 2014 10:25:38 +0000 (12:25 +0200)] 
Complete ConnOpener::connect change from r13459

11 years agoWindows: fix various libip build issues
Amos Jeffries [Mon, 9 Jun 2014 15:04:29 +0000 (08:04 -0700)] 
Windows: fix various libip build issues

* Missing include ws2tcpip.h for IPv6 definitions
* Alternative IN6_ARE_ADDR_EQUAL definition required
* 'byte' is a reserved / system defined type on Windows,
 resolve variable shadowing by renaming to ipbyte.

11 years agoWindows: rename TcpLogger::connect
Amos Jeffries [Mon, 9 Jun 2014 14:30:49 +0000 (07:30 -0700)] 
Windows: rename TcpLogger::connect

Windows sockets API is mapped via #define macros. connect() macro and
this TcpLogger method collide. Rename the method doConnect().

11 years agoWindows: rename ConnOpener::connect
Amos Jeffries [Mon, 9 Jun 2014 13:32:43 +0000 (06:32 -0700)] 
Windows: rename ConnOpener::connect

Windows sockets API is mapped via #define macros. connect() macro and
this ConnOpener method collide. Rename the method doConnect().

11 years agoRevert rename of Comm::Flag ERROR
Amos Jeffries [Mon, 9 Jun 2014 13:18:48 +0000 (06:18 -0700)] 
Revert rename of Comm::Flag ERROR

On MinGW at least ERROR is a #define'd macro resulting in build failure.
Revert to the old name COMM_ERROR until we can find a better one that
does not duplicate 'comm'.

11 years agoRFC2616 obsoleted by RFC 7230 et al
Amos Jeffries [Mon, 9 Jun 2014 01:38:06 +0000 (18:38 -0700)] 
RFC2616 obsoleted by RFC 7230 et al

11 years agoCharacterSet: update RFC723x references and add some missing sets
Amos Jeffries [Sat, 7 Jun 2014 10:23:47 +0000 (03:23 -0700)] 
CharacterSet: update RFC723x references and add some missing sets

11 years agoDocs: fix Comm::ReadNow() retval text
Amos Jeffries [Sat, 7 Jun 2014 10:22:01 +0000 (03:22 -0700)] 
Docs: fix Comm::ReadNow() retval text

11 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 7 Jun 2014 00:14:38 +0000 (18:14 -0600)] 
SourceFormat Enforcement

11 years agoFix error in rev.13447 "ssl_bump none" mode fixes.
Christos Tsantilas [Fri, 6 Jun 2014 14:52:54 +0000 (17:52 +0300)] 
Fix error in rev.13447 "ssl_bump none" mode fixes.

Fix to allow squid build when SSL is enabled

11 years agoFix to allow ICAP subsystem build after rev.13445 and rev.13448
Christos Tsantilas [Fri, 6 Jun 2014 14:51:04 +0000 (17:51 +0300)] 
Fix to allow ICAP subsystem build after rev.13445 and rev.13448

Add "comm/Read.h" file to include files for src/adaptation/icap/Xaction.cc

11 years agoRevert unnecessary debug in rev.13450
Amos Jeffries [Fri, 6 Jun 2014 10:45:26 +0000 (03:45 -0700)] 
Revert unnecessary debug in rev.13450

11 years agoFix regression in client read buffer
Amos Jeffries [Fri, 6 Jun 2014 09:38:02 +0000 (02:38 -0700)] 
Fix regression in client read buffer

SBuf acts like a floating 'window' of space in a MemBlob which acts a
essentially like a ring-buffer. However on requests with body payload
being drop-fed in very small amounts it is possible to exactly fill the
MemBlob and also to shuffle the SBuf window right to the end.
It is also possible if an earlier request (or the headers associated with
the drip-fed body is holding the beginning of the underlying MemBlob.
 These events cause haveCapadity==0 so haveCapacity*2 == 0.

If this happens we need to allocate a new MemBlob to get any space for
future I/O. The old MemBlob will be released by whatever other SBuf was
holding it locked.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 6 Jun 2014 00:14:36 +0000 (18:14 -0600)] 
SourceFormat Enforcement

11 years agoSome flags missed in rev.13445
Amos Jeffries [Thu, 5 Jun 2014 16:05:41 +0000 (09:05 -0700)] 
Some flags missed in rev.13445

11 years agoFix error in rev.13417 "ssl_bump none" mode crashes squid
Amos Jeffries [Thu, 5 Jun 2014 15:57:23 +0000 (08:57 -0700)] 
Fix error in rev.13417 "ssl_bump none" mode crashes squid

The fake CONNECT request generated to relay non-bumped traffic needs to
be pre-pended to any existing data in the ConnStateData::In buffer.
Otherwise our new bytes will corrupt any traffic bytes already in there
and our intended CONNECT request will never be recognised as we re-parse
the buffer.

11 years agoSome extra polish on rev.13442
Amos Jeffries [Thu, 5 Jun 2014 15:13:19 +0000 (08:13 -0700)] 
Some extra polish on rev.13442

11 years agoSourceLayout: rename comm_err_t to Comm::Flag
Amos Jeffries [Thu, 5 Jun 2014 14:57:58 +0000 (07:57 -0700)] 
SourceLayout: rename comm_err_t to Comm::Flag

Integration testing of rev.13443 revealed that there were two copies of
comm_err_t.h in the source code.

* Remove the unnecessary duplicate file.
* Shuffle the enum into Comm:: scope as 'Flag'.
* Reduce the enum value labels to drop the redundant prefix.
* Rename COMM_EOF to Comm::ENDFILE to avoid colliston with #define EOF
  in system headers.

11 years agoFix typo in rev.13441
Amos Jeffries [Thu, 5 Jun 2014 14:49:32 +0000 (07:49 -0700)] 
Fix typo in rev.13441

11 years agoCleanup: remove comm_read_cancel(AsyncCall) API
Amos Jeffries [Thu, 5 Jun 2014 09:32:50 +0000 (02:32 -0700)] 
Cleanup: remove comm_read_cancel(AsyncCall) API

Converting remaining users of the old API wrapper to Comm::ReadCancel.

11 years agoUpdate the Comm:: API for read(2)
Amos Jeffries [Thu, 5 Jun 2014 08:28:20 +0000 (01:28 -0700)] 
Update the Comm:: API for read(2)

... using an algorithm suggested by Alex Rousskov.

The code for Comm:: read operations is shuffled into comm/libcomm.la and
the files comm/Read.{h,cc} in symmetry with the current Comm::Write API.

The new API consists of:

 * Comm::Read() which accepts the Comm::Connection pointer for the
socket to read on and an AsyncCall callback to be run when read is
ready. The Job is responsible for separately initiating read(2) or
alternative action when that callback is run.

 * Comm::ReadNow() which accepts an SBuf buffer and a CommIoCbParams
initialized to contain the Comm::Connection pointer for the socket to
read on. TheCommIoCbParams will be filled out with result flag, xerrno,
and size.
This synchronously performs read(2) operations to append bytes to the
provided buffer. It returns a comm_err_t flag for use in determining how
to handle the results and signalling one of OK, INPROGRESS, ERROR, EOF
as having happened.

comm_read() API is retained for backward compatibility during the
transitional period. However it is now deprecated and scheduled for
removal ASAP. The SBuf overloaded variant is now removed.

 * Comm::ReadCancel() - a renaming of the comm_read_cancel() AsyncCall
API. Other cancel API(s) are now deprecated and will be removed ASAP.

Code using comm_read_cancel() with AsyncCall may immediately switch to
this new API with no logic changes necessary even if they are not using
other new Comm API calls.

 * Comm::MonitorsRead() - a renaming of comm_monitors_read() AsyncCall
API. comm_monitors_read() is now removed.

Other changes:
 - the unused comm_has_pending_read_callback() API is erased.
 - the IoCallback::buf2 mechanism previously used for SBuf read I/O is
   erased.
 - ConnStateData is converted to this new API for filling its SBuf I/O
   buffer and for monitoring pinned connection closures.
 - fde::readPending() converted to new Comm::MonitorsRead() API.
 - Comm half-closed monitoring feature is also converted to this new API.

NP: one bug in ConnStateData handling of intercepted HTTPS traffic is
noted but not fixed in this patch.

11 years agoCross-compile: Add BUILDCXX and BUILDCXXFLAGS configure options
Amos Jeffries [Wed, 4 Jun 2014 15:30:16 +0000 (08:30 -0700)] 
Cross-compile: Add BUILDCXX and BUILDCXXFLAGS configure options

We have provided HOSTCXX for some time. However in the official cross
compilation terminology HOST is the output architecture. Renames to
BUILD to align with the official terminology of which machine the tools
it builds are run on.

Also, add a flags variable and document these as important variables in
./configure --help output

11 years agoCleanup: provide Comm::ConnOpener via comm/forward.h
Amos Jeffries [Tue, 3 Jun 2014 11:00:36 +0000 (04:00 -0700)] 
Cleanup: provide Comm::ConnOpener via comm/forward.h

11 years agoAdd TCP_TUNNEL log code for CONNECT tunnels which are not SSL-bumped
Amos Jeffries [Tue, 3 Jun 2014 08:52:29 +0000 (02:52 -0600)] 
Add TCP_TUNNEL log code for CONNECT tunnels which are not SSL-bumped

11 years agoMarked const variables in Tokenizer methods as such
Francesco Chemolli [Mon, 2 Jun 2014 17:52:31 +0000 (19:52 +0200)] 
Marked const variables in Tokenizer methods as such

11 years agoChange order of BSD-specific network includes so that they are properly picked up
Francesco Chemolli [Mon, 2 Jun 2014 15:04:19 +0000 (17:04 +0200)] 
Change order of BSD-specific network includes so that they are properly picked up

11 years agoCleanup: use C++ cerrno instead of C errno.h
Amos Jeffries [Mon, 2 Jun 2014 07:19:35 +0000 (00:19 -0700)] 
Cleanup: use C++ cerrno instead of C errno.h

11 years agoReduce cache_effective_user was leaking $HOME memory
Alex Rousskov [Mon, 2 Jun 2014 06:23:12 +0000 (23:23 -0700)] 
Reduce cache_effective_user was leaking $HOME memory

putenv() leaks memory by design but there is no need to use it at all
when the path is unchanged.

11 years agoDo not leak ex_data for SSL state that survived reconfigure.
Alex Rousskov [Mon, 2 Jun 2014 05:26:17 +0000 (22:26 -0700)] 
Do not leak ex_data for SSL state that survived reconfigure.

SSL_get_ex_new_index() allocates a new index on every call, even if its
parameters remain unchanged. It should be called once per process
lifetime.

Besides leaking, this 12 year-old(!) bug could probably make some SSL
code misbehave during reconfigure because reconfigure would change the
supposedly constant ex_data indexes.

11 years agoDo not register the same Cache Manager action more than once
Alex Rousskov [Mon, 2 Jun 2014 05:16:35 +0000 (22:16 -0700)] 
Do not register the same Cache Manager action more than once

... to avoid wrong mgr:menu output and the impression of a reconfigure
memory leak.

The old code was comparing action object pointers, which could not work,
and was adding the same action on every reconfigure call for modules that
register with Cache Manager during [re]configuration.

We already have a working method for finding registered actions. Use it.

11 years agoFix leaked TcpAcceptor job on reconfiguration
Alex Rousskov [Mon, 2 Jun 2014 05:09:38 +0000 (22:09 -0700)] 
Fix leaked TcpAcceptor job on reconfiguration

... by monitoring and reacting to the listening socket closure.

Every job that waits for Comm I/O must have a FD closure handler.

11 years agoFix leak of ACLs related to adaptation access rules
Alex Rousskov [Mon, 2 Jun 2014 04:54:19 +0000 (21:54 -0700)] 
Fix leak of ACLs related to adaptation access rules

11 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 2 Jun 2014 00:15:10 +0000 (18:15 -0600)] 
SourceFormat Enforcement

11 years agoCopy compat from compat/strtoll.c to Tokenizer.cc
Francesco Chemolli [Sun, 1 Jun 2014 21:04:31 +0000 (23:04 +0200)] 
Copy compat from compat/strtoll.c to Tokenizer.cc

11 years agoMerge: SBuf-based Tokenizer
Francesco Chemolli [Sun, 1 Jun 2014 16:21:30 +0000 (18:21 +0200)] 
Merge: SBuf-based Tokenizer

11 years agoMerged from trunk
Francesco Chemolli [Sun, 1 Jun 2014 14:17:37 +0000 (16:17 +0200)] 
Merged from trunk

11 years agoDocument token() behaviour at end-of-buffer
Amos Jeffries [Sun, 1 Jun 2014 13:53:17 +0000 (06:53 -0700)] 
Document token() behaviour at end-of-buffer

11 years agoDocs: update reference to RFC7230 (draft-ietf-httpbis-p1-messaging-26)
Amos Jeffries [Sun, 1 Jun 2014 12:38:03 +0000 (05:38 -0700)] 
Docs: update reference to RFC7230 (draft-ietf-httpbis-p1-messaging-26)

11 years agoCleanup: de-duplicate auth_param program parameter code
Amos Jeffries [Sat, 31 May 2014 17:00:05 +0000 (10:00 -0700)] 
Cleanup: de-duplicate auth_param program parameter code

Moves the "program" parse and dump code into Auth::Config.

Also, changes API to Auth::Config::dump() to not dump any config settings
for schemes which are not configured with a "program". Including scheme
specific settings.

Also, fixes missing Digest "utf8" parameter in config dump.

11 years agoDocs: update auth_param documentation
Amos Jeffries [Sat, 31 May 2014 16:22:44 +0000 (09:22 -0700)] 
Docs: update auth_param documentation

11 years agoCleanup: de-duplicate auth_param realm configuration
Amos Jeffries [Sat, 31 May 2014 15:51:14 +0000 (08:51 -0700)] 
Cleanup: de-duplicate auth_param realm configuration

Move realm parse and config dump logics to Auth::Config base object.
This de-duplicates Basic, Digest (and future schemes ie Bearer) config
processing code.  Also makes realm available to NTLM and Negotiate
schemes, although at present it remains unused by those schemes.

Also, convert the realm parameter string to an SBuf. Removing the need
for some memory maintenance code.

11 years agoCleanup Tokenizer::token
Amos Jeffries [Fri, 30 May 2014 12:41:24 +0000 (05:41 -0700)] 
Cleanup Tokenizer::token

* remove incorrect comment

* return false with no side effects if end of buffer is reached inside
  the token, unless \0 is defined as one of the delimiters.

11 years agoMerged from trunk
Francesco Chemolli [Fri, 30 May 2014 09:52:11 +0000 (11:52 +0200)] 
Merged from trunk

11 years agoFixed Parser::Tokenizer::int64, added more test cases
Francesco Chemolli [Fri, 30 May 2014 09:42:45 +0000 (11:42 +0200)] 
Fixed Parser::Tokenizer::int64, added more test cases

11 years agoCleanup: de-duplicate handling of auth_param 'children'
Amos Jeffries [Wed, 28 May 2014 11:38:34 +0000 (04:38 -0700)] 
Cleanup: de-duplicate handling of auth_param 'children'

11 years agoDocs: HTTP 308 status is now RFC 7238
Amos Jeffries [Wed, 28 May 2014 10:50:23 +0000 (03:50 -0700)] 
Docs: HTTP 308 status is now RFC 7238

11 years agoPolish
Amos Jeffries [Tue, 27 May 2014 08:34:55 +0000 (01:34 -0700)] 
Polish

11 years agoUnit test for sub-string parsing
Amos Jeffries [Tue, 27 May 2014 08:34:00 +0000 (01:34 -0700)] 
Unit test for sub-string parsing

11 years agoMerged from trunk
Francesco Chemolli [Tue, 27 May 2014 08:23:05 +0000 (10:23 +0200)] 
Merged from trunk

11 years agoClarify Parser::Tokenizer::int64 documentation, add one test case.
Francesco Chemolli [Mon, 26 May 2014 14:06:07 +0000 (16:06 +0200)] 
Clarify Parser::Tokenizer::int64 documentation, add one test case.

11 years agoImplement Parser::Tokenizer::int64 and unit tests
Francesco Chemolli [Mon, 26 May 2014 13:04:01 +0000 (15:04 +0200)] 
Implement Parser::Tokenizer::int64 and unit tests

11 years agoInterim: start implementing Parser::Tokenizer::int64
Francesco Chemolli [Thu, 22 May 2014 20:37:12 +0000 (22:37 +0200)] 
Interim: start implementing Parser::Tokenizer::int64

11 years agoFix Tokenizer::token
Francesco Chemolli [Thu, 22 May 2014 17:30:42 +0000 (19:30 +0200)] 
Fix Tokenizer::token

11 years agoBug 4056: assertion MemPools[type] from netdbExchangeStart()
Amos Jeffries [Thu, 22 May 2014 10:13:57 +0000 (03:13 -0700)] 
Bug 4056: assertion MemPools[type] from netdbExchangeStart()

11 years agoCleanup: document and rename Auth::UserRequest::module_start to startHelperLookup
Amos Jeffries [Thu, 22 May 2014 09:12:48 +0000 (02:12 -0700)] 
Cleanup: document and rename Auth::UserRequest::module_start to startHelperLookup

11 years agoCleanup: drop Auth::User::proxy_auth_list header cache
Amos Jeffries [Thu, 22 May 2014 06:04:05 +0000 (23:04 -0700)] 
Cleanup: drop Auth::User::proxy_auth_list header cache

This list/cache was originally used to short-circuit auth helper lookups
based on previousy seen [Proxy-]Authorization header strings.
However, that permitted replay attacks in most auth schemes and has been
replaced by scheme-specific mechanisms:

* Basic and Digest credentials are cached in the global user name cache
  wih additional nonce/password comparisons to verify located entries.

* NTLM and Negotiate credentials are cached in the ConnStateData with
  exact-match comparison done to verify tokens.

11 years agoDocs: mention -k restart in command line usage
Amos Jeffries [Wed, 21 May 2014 17:50:51 +0000 (10:50 -0700)] 
Docs: mention -k restart in command line usage

11 years agoDocs: formalize Tokenizer uniform method behaviour
Amos Jeffries [Wed, 21 May 2014 17:46:04 +0000 (10:46 -0700)] 
Docs: formalize Tokenizer uniform method behaviour

11 years ago"ssl_bump none" mode crashes squid
Christos Tsantilas [Wed, 21 May 2014 06:29:38 +0000 (09:29 +0300)] 
"ssl_bump none" mode crashes squid

After r13324 patch the SBuf argument of the ConnStateData::handleReadData member
is used only to check if ConnStateData::In::buf is correctly filled with read
data. ConnStateData::handleReadData considers that the data already written
in ConnStateData::in.buf and checks if the passed Sbuf argument is the
ConnStateData::in.buf:

bool ConnStateData::handleReadData(SBuf *buf)
{
   assert(buf == &in.buf);
   .....

The httpsSslBumpAccessCheckDone function needs to write the CONNECT request
generated internally to force tunnel mode, in ConnStateData::In::buf and then
call ConnStateData::handleReadData method.

11 years agoBug 4065: round-robin neighbor selection with unequal weights
Mike Mitchell [Tue, 20 May 2014 17:08:56 +0000 (10:08 -0700)] 
Bug 4065: round-robin neighbor selection with unequal weights

11 years agoFix file include order and paths
Amos Jeffries [Tue, 20 May 2014 16:11:27 +0000 (09:11 -0700)] 
Fix file include order and paths

11 years agoPolish namespace usage in .cc
Amos Jeffries [Tue, 20 May 2014 16:08:59 +0000 (09:08 -0700)] 
Polish namespace usage in .cc

11 years agoUpdate documentation
Amos Jeffries [Tue, 20 May 2014 16:06:09 +0000 (09:06 -0700)] 
Update documentation

11 years agoAdd optional limit parameter to Tokenizer::prefix()
Amos Jeffries [Tue, 20 May 2014 11:35:49 +0000 (04:35 -0700)] 
Add optional limit parameter to Tokenizer::prefix()

11 years agoCleanup: SBuf report how many bytes consume()d
Amos Jeffries [Mon, 19 May 2014 06:06:36 +0000 (23:06 -0700)] 
Cleanup: SBuf report how many bytes consume()d

11 years agoBug 4050: Segfault in CommSelectEngine::checkEvents on helper response
Alex Rousskov [Thu, 15 May 2014 07:32:10 +0000 (00:32 -0700)] 
Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response

11 years agoRegression: segfault logging with %tg format specifier
Steve Hill [Tue, 13 May 2014 10:27:18 +0000 (03:27 -0700)] 
Regression: segfault logging with %tg format specifier

In trunk rev.13387 Token class data member was converted from union to
struct without adding initializer for the timespec field.

timespec is a redundant field anyway, just remove it.

11 years agoMerged ext_delayer_acl
Francesco Chemolli [Mon, 12 May 2014 16:35:23 +0000 (18:35 +0200)] 
Merged ext_delayer_acl

11 years agoRenamed delayer helper for subst_perlshell compatibility
Francesco Chemolli [Mon, 12 May 2014 16:22:30 +0000 (18:22 +0200)] 
Renamed delayer helper for subst_perlshell compatibility

11 years agoMerged from trunk
Francesco Chemolli [Mon, 12 May 2014 16:06:11 +0000 (18:06 +0200)] 
Merged from trunk

11 years agoReverted r13409 due to incompatibility with BSD pmake
Francesco Chemolli [Mon, 12 May 2014 16:02:58 +0000 (18:02 +0200)] 
Reverted r13409 due to incompatibility with BSD pmake

11 years agoBug 2554: 32-bit wrap in AUFS counters
Amos Jeffries [Mon, 12 May 2014 12:49:12 +0000 (05:49 -0700)] 
Bug 2554: 32-bit wrap in AUFS counters

11 years agoMerged from trunk
Francesco Chemolli [Mon, 12 May 2014 09:43:32 +0000 (11:43 +0200)] 
Merged from trunk

11 years agoRenamed installed script to ext_delayer_acl
Francesco Chemolli [Mon, 12 May 2014 09:43:23 +0000 (11:43 +0200)] 
Renamed installed script to ext_delayer_acl

11 years agoChanged subst_perlshell Makefile recipe to use the actual source file name
Francesco Chemolli [Mon, 12 May 2014 09:42:30 +0000 (11:42 +0200)] 
Changed subst_perlshell Makefile recipe to use the actual source file name

11 years agoIntegrate delayer helper with build system
Francesco Chemolli [Sun, 11 May 2014 19:12:35 +0000 (21:12 +0200)] 
Integrate delayer helper with build system

11 years agoCheck for PURGE method using method enum instead of strcmp()
Amos Jeffries [Fri, 9 May 2014 17:32:25 +0000 (10:32 -0700)] 
Check for PURGE method using method enum instead of strcmp()

Removes one minor but needless drag on startup and reconfigure speed.

11 years agoauthor: Alex Rousskov <rousskov@measurement-factory.com>
Christos Tsantilas [Fri, 9 May 2014 15:19:40 +0000 (18:19 +0300)] 
author: Alex Rousskov <rousskov@measurement-factory.com>
Avoid on-exit crashes when adaptation is enabled.

After trunk r13269 (Vector refactor) destroyed vector objects still have
positive item counts. This exposes use-after-delete bugs. In this particular
case, global adaptation rule/group/service arrays are destructed by global
destruction sequence first and then again by Adaptation::*::TheConfig objects
destructors.

This change avoiding static destruction order dependencies by storing those
global adaptation arrays on heap.

11 years agoTemporary fix for segmentation faults in FwdState::serverClosed debugging.
Alex Rousskov [Fri, 9 May 2014 04:45:54 +0000 (22:45 -0600)] 
Temporary fix for segmentation faults in FwdState::serverClosed debugging.

See r13404 for details.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 9 May 2014 00:14:30 +0000 (18:14 -0600)] 
SourceFormat Enforcement