]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
12 years agoRenamed squid.h to squid-old.h and config.h to squid.h
Francesco Chemolli [Fri, 20 Jan 2012 18:55:04 +0000 (19:55 +0100)] 
Renamed squid.h to squid-old.h and config.h to squid.h

12 years agoRemove unnecessary stub_tools dependency on String
Francesco Chemolli [Fri, 20 Jan 2012 15:59:58 +0000 (16:59 +0100)] 
Remove unnecessary stub_tools dependency on String

12 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 20 Jan 2012 01:42:50 +0000 (18:42 -0700)] 
SourceFormat Enforcement

12 years agoMerge from StatHist refactor.
Francesco Chemolli [Thu, 19 Jan 2012 20:08:53 +0000 (21:08 +0100)] 
Merge from StatHist refactor.

Added StatHist unit tests, and moved algorithm consistency checks there.
Expanded storage for histograms to 64bit unsigned.
Inlined StatHist constructor, destructor and assignment operator.
Implemented stubs for StatHist.cc and mem.cc

12 years agoGCC 4.7 fix
Jiri Skala [Tue, 17 Jan 2012 19:36:40 +0000 (20:36 +0100)] 
GCC 4.7 fix

12 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 17 Jan 2012 01:39:21 +0000 (18:39 -0700)] 
SourceFormat Enforcement

12 years agoSend DNS A and AAAA queries in parallel
Henrik Nordstrom [Mon, 16 Jan 2012 17:30:16 +0000 (18:30 +0100)] 
Send DNS A and AAAA queries in parallel

This implements sending DNS A & AAAA queries in parallel by
creating "slave" idns_query requests. Current implementation
uses the A lookup as "master" and AAAA as "slave" query.

Long term this should probably be restructured to separate "lookup
state" and "query", or even better yet to defer the DNS lookups
until connect time and perform A respective AAAA as needed only and
not look up both before attemting to connect.

This also drops the dns_v4_fallback directive as it have no effect with
parallel DNS lookups. This directive should be reinstanciated in future
to enable pure IPv6 usage.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 14 Jan 2012 01:30:37 +0000 (18:30 -0700)] 
SourceFormat Enforcement

12 years agotrimMemory for unswappable objects: fix NullStoreEntry::trimMemory compile error
Christos Tsantilas [Fri, 13 Jan 2012 16:22:21 +0000 (18:22 +0200)] 
trimMemory for unswappable objects: fix NullStoreEntry::trimMemory compile error

12 years agotrimMemory for unswappable objects
Christos Tsantilas [Fri, 13 Jan 2012 13:49:26 +0000 (15:49 +0200)] 
trimMemory for unswappable objects

Inside StoreEntry::swapOut() the StoreEntry::trimMemory() method called to
release unused MemObjects memory. The trimMemory method must called for all
store entries, but current code blocks that call for not-swappable objects,
at least.

This patch trying to fix this bug implementing the following simple logic:
   {
     bool weAreOrMayBeSwappingOut =
           swappingOut() || mayStartSwapout();

     trimMemory(weAreOrMayBeSwappingOut);

     if (!weAreOrMayBeSwappingOut)
         return; // nothing else to do
   }

This is a Measurement Factory project

12 years agoLanguage: fr updates
Bernard [Thu, 12 Jan 2012 23:05:38 +0000 (12:05 +1300)] 
Language: fr updates

12 years agoBug 3472: segfault with the message "urlParse: URL too large"
Christos Tsantilas [Mon, 9 Jan 2012 14:34:31 +0000 (16:34 +0200)] 
Bug 3472: segfault with the message "urlParse: URL too large"

12 years agoBug 3471: Segfault when %la formating code used
Christos Tsantilas [Mon, 9 Jan 2012 14:31:50 +0000 (16:31 +0200)] 
Bug 3471: Segfault when %la formating code used

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 8 Jan 2012 01:35:32 +0000 (18:35 -0700)] 
SourceFormat Enforcement

12 years agoCleanup: update most of the existing stub files to use the STUB.h framework
Amos Jeffries [Sat, 7 Jan 2012 10:15:40 +0000 (03:15 -0700)] 
Cleanup: update most of the existing stub files to use the STUB.h framework

There are still several sections to be done. Including adding library API
stubs. However these are the ones which can be done immediately without
breaking or re-writing existing unit tests.

12 years agoDrop dns_v4_fallback directive as it have no effect with parallel DNS lookups
Henrik Nordstrom [Fri, 6 Jan 2012 20:41:21 +0000 (21:41 +0100)] 
Drop dns_v4_fallback directive as it have no effect with parallel DNS lookups

The change to perform A and AAAA lookups in parallel made dns_v4_fallback
no longer have any effect.

This directive should be reinstanciated in future to enable pure IPv6 usage.

12 years agoSend DNS A and AAAA queries in parallel
Henrik Nordstrom [Fri, 6 Jan 2012 20:30:35 +0000 (21:30 +0100)] 
Send DNS A and AAAA queries in parallel

This implements sending DNS A & AAAA queries in parallel by
creating "slave" idns_query requests. Current implementation
uses the A lookup as "master" and AAAA as "slave" query.

Long term this should probably be restructured to separate "lookup
state" and "query", or even better yet to defer the DNS lookups
until connect time and perform A respective AAAA as needed only and
not look up both before attemting to connect.

12 years agoPolish compat library xfree/xxfree
Amos Jeffries [Thu, 5 Jan 2012 14:12:04 +0000 (03:12 +1300)] 
Polish compat library xfree/xxfree

* remove xxfree() entirely it has been a useless wrapper for free_const()
  for some time now.

* update replace xfree() to a static inline function to permit better
  compiler optimization

12 years agoFix testRock SHM file base path
Amos Jeffries [Thu, 5 Jan 2012 14:02:06 +0000 (03:02 +1300)] 
Fix testRock SHM file base path

12 years agoBug 3449: pt3: shm_open can fail with a mangled path
Amos Jeffries [Wed, 4 Jan 2012 22:55:08 +0000 (11:55 +1300)] 
Bug 3449: pt3: shm_open can fail with a mangled path

12 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 4 Jan 2012 01:22:23 +0000 (18:22 -0700)] 
SourceFormat Enforcement

12 years agoSourceLayout: DNS component code style changes
Amos Jeffries [Tue, 3 Jan 2012 02:19:30 +0000 (19:19 -0700)] 
SourceLayout: DNS component code style changes

- removes "dnsserver" terminology from all the Squid internals and
  ./configure docs. Replacing it with "helper" to avoid confusion.

- updates the automake conditional to ENABLE_DNSHELPER and code define
  to USE_DNSHELPER inline with coding guidelines.

- shuffles the DNS API definitions to their own header, SquidDns.h, and
  de-duplicates the init/shutdown API calls to remove some #if

12 years agoFix diskd includes
Amos Jeffries [Sun, 1 Jan 2012 13:13:06 +0000 (06:13 -0700)] 
Fix diskd includes

It seems CentOS and BSD do not include errno.h and iostream through compat

12 years agoCleanup: unlinkd is self-contained
Amos Jeffries [Sun, 1 Jan 2012 04:48:49 +0000 (17:48 +1300)] 
Cleanup: unlinkd is self-contained

This helper is very minimal. It does not use IP:: or Ipc:: symbols.
If we get linkage issues against it for them those need to be resolved
without pulling in dependencies from squid internal libraries.

12 years agoCleanup: detatch diskd from squid.h
Amos Jeffries [Sat, 31 Dec 2011 19:57:53 +0000 (08:57 +1300)] 
Cleanup: detatch diskd from squid.h

12 years agoBug 3444: send authentication challenge from ssl_bump and url_rewrite_access
Amos Jeffries [Sat, 31 Dec 2011 04:54:06 +0000 (21:54 -0700)] 
Bug 3444: send authentication challenge from ssl_bump and url_rewrite_access

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 31 Dec 2011 01:26:10 +0000 (18:26 -0700)] 
SourceFormat Enforcement

12 years agoCache Manager migration support
Amos Jeffries [Fri, 30 Dec 2011 16:01:37 +0000 (05:01 +1300)] 
Cache Manager migration support

 * Add a little bit of XHR script to the CGI cachemgr front page which
probes each of the managed proxies for http:// and https:// capabilities
and produces web links to their internal managers.

 * Reserve the template name MGR_INDEX for use by cachemgr scripts.
But do not distribute any preset template. This allows manager apps to
provide their own static template with linked scripts and objects.

 * The error page system is updated to create a blanket message
indicating missing template instead of aborting Squid if a template is
not even installed.

12 years agoPolish: allow service of internal requests over reverse-proxy ports
Amos Jeffries [Fri, 30 Dec 2011 12:29:14 +0000 (01:29 +1300)] 
Polish: allow service of internal requests over reverse-proxy ports

There is no reason why a revers-proxy port cannot service Squid internal
requests as well as whatever domain is being accelerated.

Also, scan the https_port list same as http_port list now that the
structures have been normalized.

12 years agoCleanup: de-duplicate internal URL detection
Amos Jeffries [Fri, 30 Dec 2011 12:26:51 +0000 (01:26 +1300)] 
Cleanup: de-duplicate internal URL detection

12 years agoPolish: display ACL enumeration text in debugs
Amos Jeffries [Fri, 30 Dec 2011 12:06:21 +0000 (01:06 +1300)] 
Polish: display ACL enumeration text in debugs

Slightly hackish way to do it. But avoids ACCESS_ in some weird places
and makes the cache.log reading a lot more friendly.

12 years agoSupport Cross-Origin Requests for the cache manager API
Amos Jeffries [Fri, 30 Dec 2011 03:42:50 +0000 (16:42 +1300)] 
Support Cross-Origin Requests for the cache manager API

Now that tools are being implemented to access the cache manager via
http:// scheme we need to accomodate the browser XSS protection
mechanisms which limit XHR based scripts abilities.

This adds CORS headers to manager responses. Permitting XHR to view the
Server header (to detect squid version for known capabilities) and to
flag that the XHR request may need access to credentials for
authenticating with the manager.

This also closes the feature bug 3407 requesting we support the
non-standard "Origin:" header, which is used by the CORS mechanisms.

Future work:
  Support the OPTIONS request used by CORS to detect requirements before
  POSTing. We do not yet use POST in the Squid code so that is left until
  needed.

12 years agoSourceLayout: shuffel UserRequest into Auth:: namespace
Amos Jeffries [Fri, 30 Dec 2011 01:24:57 +0000 (18:24 -0700)] 
SourceLayout: shuffel UserRequest into Auth:: namespace

No logic changes, symbols and debug only.

* shuffle AuthUserRequest to Auth::UserRequest
* shuffle AuthBasicUserRequest to Auth::Basic::UserRequest
* shuffle AuthDigestUserRequest to Auth::Digest::UserRequest
* shuffle AuthNegotiateUserRequest to Auth::Negotiate::UserRequest
* shuffle AuthNTLMUserRequest to Auth::NTLM::UserRequest

* polish and add documentation for several parts of the hierarchy

* replace obsolete debugs() location texts

12 years agoBug 3461: build regression in IPFilter NAT
Amos Jeffries [Sun, 25 Dec 2011 04:40:36 +0000 (21:40 -0700)] 
Bug 3461: build regression in IPFilter NAT

12 years agoBug 3370: external ACL sometimes skipping
Amos Jeffries [Thu, 22 Dec 2011 04:49:24 +0000 (17:49 +1300)] 
Bug 3370: external ACL sometimes skipping

Emit tag/user/log/message/pass details to the request in the case where
the external ACL entry has expired but within graceful revalidate period.

The result of this bug appears as incorrect matches later down the ACL
processing in any config relying on the external ACL output values.
Example; for bypassing auth login, or for filtering tagged traffic.

12 years agoPolish: better debugs for IPFilter NAT
Amos Jeffries [Wed, 21 Dec 2011 12:17:34 +0000 (01:17 +1300)] 
Polish: better debugs for IPFilter NAT

12 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 20 Dec 2011 01:47:48 +0000 (18:47 -0700)] 
SourceFormat Enforcement

12 years agoBug 3447: assertion failed: CommCalls.h:150: "dp"
Amos Jeffries [Mon, 19 Dec 2011 13:18:29 +0000 (06:18 -0700)] 
Bug 3447: assertion failed: CommCalls.h:150: "dp"

Detatch FD/connection close handlers from reliance on commCloseCbParams
some handlers use FdeCbParams and others are possible.

If the callback handler needs FD the call creator must save it in the
params at call construction time.

12 years agoCleanup: remove https_port_list type
Amos Jeffries [Mon, 19 Dec 2011 03:51:22 +0000 (16:51 +1300)] 
Cleanup: remove https_port_list type

* Complete the merger with http_port_list and remove the https-specific struct

* kept config file type for parser magics and backward compatibility

12 years agoLanguage: fr updates
Bernard [Sun, 18 Dec 2011 17:08:01 +0000 (06:08 +1300)] 
Language: fr updates

12 years agoLanguage: fr updates
Bernard [Sun, 18 Dec 2011 17:06:21 +0000 (06:06 +1300)] 
Language: fr updates

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 18 Dec 2011 01:31:58 +0000 (18:31 -0700)] 
SourceFormat Enforcement

12 years agoImplemented and made public StatHist copy-constructor
Francesco Chemolli [Sat, 17 Dec 2011 21:23:14 +0000 (22:23 +0100)] 
Implemented and made public StatHist copy-constructor

12 years agoStatHist fixes
Francesco Chemolli [Sat, 17 Dec 2011 08:32:53 +0000 (09:32 +0100)] 
StatHist fixes

- added protection against self-assignment
- hid copy-constructor
- de-virtualized destructor

12 years agoCleanup: comm Timeout API
Amos Jeffries [Sat, 17 Dec 2011 03:42:43 +0000 (20:42 -0700)] 
Cleanup: comm Timeout API

* accept Comm::Connection when setting timeout
 - use commSetConnTimeout() now

* drop old cbdata wrapper function

* drop raw-FD timeout setting (unused)

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 17 Dec 2011 01:26:31 +0000 (18:26 -0700)] 
SourceFormat Enforcement

12 years agoBug 3391: forwarded_for log functionality broken
Amos Jeffries [Fri, 16 Dec 2011 11:29:40 +0000 (00:29 +1300)] 
Bug 3391: forwarded_for log functionality broken

12 years agoMerge StatHist feature-branch:
Francesco Chemolli [Fri, 16 Dec 2011 11:15:22 +0000 (12:15 +0100)] 
Merge StatHist feature-branch:
- StatHist refactoring
- StatCounters untangling from global symbol table

12 years agoMerged from trunk
Francesco Chemolli [Fri, 16 Dec 2011 11:06:46 +0000 (12:06 +0100)] 
Merged from trunk

12 years agoBug 3391: raise cbdata lock limits
Amos Jeffries [Fri, 16 Dec 2011 09:10:02 +0000 (22:10 +1300)] 
Bug 3391: raise cbdata lock limits

In 3.2 it is now possible to have >64K simultaneous connections
referencing some permanent cbdata locked state (port, peer, acl etc)

12 years agoRenamed some StatHist private variables to avoid name clases.
Francesco Chemolli [Fri, 16 Dec 2011 06:04:45 +0000 (07:04 +0100)] 
Renamed some StatHist private variables to avoid name clases.

12 years agoMoved some more typedefs to StatHist.h
Francesco Chemolli [Thu, 15 Dec 2011 23:14:48 +0000 (00:14 +0100)] 
Moved some more typedefs to StatHist.h
Improved documentation
Removed squid.h include
Changed StatHist::operator= to almost be an actual assignment operator
Fixed findBin corner-case

12 years agoRenamed some fields to CamelCase.
Francesco Chemolli [Thu, 15 Dec 2011 16:32:38 +0000 (17:32 +0100)] 
Renamed some fields to CamelCase.

12 years agoBug 2519: ssl_bump + Authentication (LDAP Digest) issues
Christos Tsantilas [Thu, 15 Dec 2011 11:56:37 +0000 (13:56 +0200)] 
Bug 2519: ssl_bump + Authentication (LDAP Digest) issues

When the ssl_bump and authentication iare both enabled for an ssl-bumped port
all SSL enabled websites prompt the user for authentication information once
per FQDN.

Tis patch inherits the authentication info from the CONNECT request to the
sslbumped requests.

12 years agoUpdated (and made use of) stub_StatHist
Francesco Chemolli [Thu, 15 Dec 2011 07:21:26 +0000 (08:21 +0100)] 
Updated (and made use of) stub_StatHist

12 years agoUpdated (and made use of) stub_StatHist
Francesco Chemolli [Thu, 15 Dec 2011 07:01:07 +0000 (08:01 +0100)] 
Updated (and made use of) stub_StatHist

12 years agoBug 3448: 204 response problem in adaptation chains
Christos Tsantilas [Wed, 14 Dec 2011 14:41:49 +0000 (16:41 +0200)] 
Bug 3448: 204 response problem in adaptation chains

When the first ICAP service in a chain respond with 204 the next service
is aborted on Must(old_request->canonical) expression inside Adaptation::Icap::ModXact::encapsulateHead method.

Squid ICAP try to set the request::canonical member of the adapted request
inside Adaptation::Icap::ModXact::prepEchoing when the 204 response received.
The adapted.header->parse(..) call some lines after will set canonical member
to NULL.
This patch call the urlCanonical() function after parse() method
to build canonical member for the adapted request, instead of trying to copy
this member from the original request.

12 years agoDocumentation for StatHist
kinkie@squid-cache.org [Wed, 14 Dec 2011 07:35:43 +0000 (08:35 +0100)] 
Documentation for StatHist

12 years agoSome documentation for StatHist.
Francesco Chemolli [Tue, 13 Dec 2011 22:49:33 +0000 (23:49 +0100)] 
Some documentation for StatHist.
Protected the StatHist::init method.

12 years agoImplemented proper distructor for StatHist
Francesco Chemolli [Tue, 13 Dec 2011 18:24:47 +0000 (19:24 +0100)] 
Implemented proper distructor for StatHist
Started to add some documentation for StatHist.
Removed includes of config.h from header files.

12 years agoMerged from trunk
Francesco Chemolli [Tue, 13 Dec 2011 10:57:20 +0000 (11:57 +0100)] 
Merged from trunk

12 years agoRefactored statHistIntInit
Francesco Chemolli [Mon, 12 Dec 2011 16:46:49 +0000 (17:46 +0100)] 
Refactored statHistIntInit

12 years agoPrep for 3.2.0.14
Amos Jeffries [Mon, 12 Dec 2011 09:51:08 +0000 (02:51 -0700)] 
Prep for 3.2.0.14

12 years agoRefactored void statHistLogInit
Francesco Chemolli [Sun, 11 Dec 2011 12:10:22 +0000 (13:10 +0100)] 
Refactored void statHistLogInit
Started refactoring statHistEnumInit

12 years agoStatHist data members are now protected, not private.
Francesco Chemolli [Sat, 10 Dec 2011 22:02:17 +0000 (23:02 +0100)] 
StatHist data members are now protected, not private.
ported some clients from statHistLogInit to StatHist::logInit

12 years agoMade all StatHist data members private.
Francesco Chemolli [Sat, 10 Dec 2011 21:51:28 +0000 (22:51 +0100)] 
Made all StatHist data members private.

12 years agoFixed some more dead references to stats.
Francesco Chemolli [Sat, 10 Dec 2011 21:34:36 +0000 (22:34 +0100)] 
Fixed some more dead references to stats.

12 years agoRemoved extra symbol in StatCounters.cc object file.
Francesco Chemolli [Sat, 10 Dec 2011 17:01:25 +0000 (18:01 +0100)] 
Removed extra symbol in StatCounters.cc object file.

12 years agoMoved statCounter out of globals.h into own object file.
Francesco Chemolli [Sat, 10 Dec 2011 16:29:31 +0000 (17:29 +0100)] 
Moved statCounter out of globals.h into own object file.
Changed some operator++ from postfix to prefix.

12 years agoMade StatHist::capacity private
Francesco Chemolli [Fri, 9 Dec 2011 22:09:20 +0000 (23:09 +0100)] 
Made StatHist::capacity private

12 years agoMade StatHist::bins private
Francesco Chemolli [Fri, 9 Dec 2011 22:02:47 +0000 (23:02 +0100)] 
Made StatHist::bins private

12 years agoPut HttpHeaderStat, StatCounters and cd_guess_stats classes in their own headers.
Francesco Chemolli [Fri, 9 Dec 2011 20:45:55 +0000 (21:45 +0100)] 
Put HttpHeaderStat, StatCounters and cd_guess_stats classes in their own headers.

12 years agoReverted StatHistLog changes. Too ambitious for now.
Francesco Chemolli [Fri, 9 Dec 2011 17:28:13 +0000 (18:28 +0100)] 
Reverted StatHistLog changes. Too ambitious for now.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 9 Dec 2011 01:17:27 +0000 (18:17 -0700)] 
SourceFormat Enforcement

12 years agoMemBufs don't need explicit cleanup anymore in HttpBody
Francesco Chemolli [Thu, 8 Dec 2011 22:07:47 +0000 (23:07 +0100)] 
MemBufs don't need explicit cleanup anymore in HttpBody

12 years agoRemoved dead HttpHeaderExtField code.
Francesco Chemolli [Thu, 8 Dec 2011 21:58:09 +0000 (22:58 +0100)] 
Removed dead HttpHeaderExtField code.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 8 Dec 2011 01:22:28 +0000 (18:22 -0700)] 
SourceFormat Enforcement

12 years agoStandardize data field name in FileMap.
Francesco Chemolli [Wed, 7 Dec 2011 19:17:20 +0000 (20:17 +0100)] 
Standardize data field name in FileMap.

12 years agoC++-refactor FileMap
Francesco Chemolli [Wed, 7 Dec 2011 18:56:59 +0000 (19:56 +0100)] 
C++-refactor FileMap

12 years agoNONWORKING: try subclassing instead of C-style pseudoconstructors.
Francesco Chemolli [Wed, 7 Dec 2011 12:27:14 +0000 (13:27 +0100)] 
NONWORKING: try subclassing instead of C-style pseudoconstructors.

12 years agoPolish: correct debug text about ACL 'AND' list match state
Amos Jeffries [Wed, 7 Dec 2011 11:46:49 +0000 (04:46 -0700)] 
Polish: correct debug text about ACL 'AND' list match state

12 years agoDocs: mention ssl_crtd DB needs clearing after CA changes.
Amos Jeffries [Tue, 6 Dec 2011 22:44:26 +0000 (11:44 +1300)] 
Docs: mention ssl_crtd DB needs clearing after CA changes.

12 years agoc++-refactored statHistDump including clients and stubs
Francesco Chemolli [Tue, 6 Dec 2011 22:23:56 +0000 (23:23 +0100)] 
c++-refactored statHistDump including clients and stubs

12 years agoPartially reverted change to statHistDeltaPctile.
Francesco Chemolli [Tue, 6 Dec 2011 15:45:18 +0000 (16:45 +0100)] 
Partially reverted change to statHistDeltaPctile.
Changed to c++ linking convention for all functions.

12 years agoMigrated statHistBin to StatHist::findBin
Francesco Chemolli [Tue, 6 Dec 2011 14:42:04 +0000 (15:42 +0100)] 
Migrated statHistBin to StatHist::findBin

12 years agoMigrated statHistCount callers to StatHist::count
Francesco Chemolli [Tue, 6 Dec 2011 14:24:47 +0000 (15:24 +0100)] 
Migrated statHistCount callers to StatHist::count

12 years agoAuthor: Alex Rousskov <rousskov@measurement-factory.com>
Christos Tsantilas [Tue, 6 Dec 2011 14:06:38 +0000 (16:06 +0200)] 
Author: Alex Rousskov <rousskov@measurement-factory.com>
Bug 3420: Request body consumption races and !theConsumer exception.

Also fixes endless waiting for HTTP client to send req body we no longer need.

Before these changes, the client side used a single "closing" state to
handle two different error conditions:

  1. We stopped receiving request body because of some error.
  2. We stopped sending response because of some error.

When a "directional" error occurred, we try to keep the transaction going in
the other direction (e.g., to give ICAP the entire request or to give HTTP
client the entire response). However, because there was just one "closing"
state, the code failed to correctly detect or process many corner cases,
resulting in stuck transactions and !theConsumer assertions/exceptions due to
races between enableAutoConsumption() and expectNoConsumption() calls.

This patch replaces the "closing" state with two direction-specific "we
stopped sending/receiving" flags.

Now, when the response sending code is done, it now checks whether the
receiving code stopped and closes the connection as needed. This is done both
when we encounter a sending error (ClientSocketContext::initiateClose) and
when we successfully sent the entire response to the client
(ClientSocketContext::keepaliveNextRequest).

Similarly, when the request body reading code is done, it now checks whether
the receiving code stopped and closes the connection as needed. This is done
both when we encounter a receiving error
(ConnStateData::noteBodyConsumerAborted) and when we successfully receive the
entire request body from the client (ClientSocketContext::writeComplete).

TODO: This patch focuses on various error cases. We might still have problems
when there is an early HTTP response and no errors of any kind. I marked the
corresponding old code with an XXX.

12 years agoRemoved statHistCopy, started using operator= instead.
Francesco Chemolli [Tue, 6 Dec 2011 12:28:22 +0000 (13:28 +0100)] 
Removed statHistCopy, started using operator= instead.

12 years agoImplemented StatHist default constructor
Francesco Chemolli [Tue, 6 Dec 2011 12:21:20 +0000 (13:21 +0100)] 
Implemented StatHist default constructor
Refactored StatHist::init

12 years agorefactored StatHist::val
Francesco Chemolli [Tue, 6 Dec 2011 07:01:34 +0000 (08:01 +0100)] 
refactored StatHist::val
introduced all prototypes into header-file.

12 years agoRefactored StatHist::clean
Francesco Chemolli [Tue, 6 Dec 2011 05:32:23 +0000 (06:32 +0100)] 
Refactored StatHist::clean

12 years agoMoved StatHist class to its own header-file, included the header from all relevant...
Francesco Chemolli [Mon, 5 Dec 2011 16:52:47 +0000 (17:52 +0100)] 
Moved StatHist class to its own header-file, included the header from all relevant places.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 5 Dec 2011 01:40:45 +0000 (18:40 -0700)] 
SourceFormat Enforcement

12 years agoc++-refactor HttpBody
Francesco Chemolli [Sun, 4 Dec 2011 13:52:07 +0000 (14:52 +0100)] 
c++-refactor HttpBody

12 years agoFix assertion failed: external_acl.cc:908: ch->auth_user_request != NULL
Amos Jeffries [Sun, 4 Dec 2011 06:44:05 +0000 (23:44 -0700)] 
Fix assertion failed: external_acl.cc:908: ch->auth_user_request != NULL

External ACL sometimes cannot find the credentials in ACL Checklist even
if they are attached to the HTTPRequest object.

This seems to happen when the checklist is created and the line match
started before the credentials are known. The credentials validation
updates the HTTP request state but is not aware of ACL checklists needing
to be updated so it never happens.

This patch:
* locate the %LOGIN value from either place where credentials can be found,
* updates the checklist if it was unset,
* passes '-' to the helper if no credentials at all were given.

Although the earlier logics forcing a lookup means this '-' case should
not happen it might if the external ACL were processed in 'fast' check.

12 years agoAdd FdeCbParams parameter object to CommCalls API.
Amos Jeffries [Sun, 4 Dec 2011 05:43:42 +0000 (22:43 -0700)] 
Add FdeCbParams parameter object to CommCalls API.

The problem:
  CommCalls API functionality is conflated with comm operational calls
created to do general FD handling (FD as pipe handle, FD as disk handle,
FD as pointer into the fd_table structure). Sometimes because they do
operations mirroring comm handlers and also use FD.  None of this actually
requires the CommCalls layer to be involved though. The Comm::Connection
objects which CommCall TCP handlers pass around is also very inappropriate
for these FD types.

This adds FdeCbParams to CommCalls infrastructure, for use internally and
"lower" than comm API to pass around raw FD values. This should be avoided
on TCP socket FD, but may be used by callers needing FD where
Comm::Connection is inappropriate.

12 years agoCBDATA call Dialer template
Amos Jeffries [Sun, 4 Dec 2011 05:39:39 +0000 (22:39 -0700)] 
CBDATA call Dialer template

This adds a template for dialing Unary CBDATA wrapper functions with
type safety. Avoiding the casting that currently occurs in wrappers and
allowing the AsyncCall APIs to be used for these callbacks.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 4 Dec 2011 01:33:38 +0000 (18:33 -0700)] 
SourceFormat Enforcement

12 years agoFix arguments to swaplog renaming calls
kinkie@squid-cache.org [Sat, 3 Dec 2011 17:05:32 +0000 (18:05 +0100)] 
Fix arguments to swaplog renaming calls

12 years agoPolish debug messages on swap.state rename failure
Amos Jeffries [Sat, 3 Dec 2011 14:47:51 +0000 (07:47 -0700)] 
Polish debug messages on swap.state rename failure