]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
13 years agoBug 3449: shm_open failed (part 4: fixing memory_cache_shared defaults)
Alex Rousskov [Thu, 26 Jan 2012 14:52:35 +0000 (07:52 -0700)] 
Bug 3449: shm_open failed (part 4: fixing memory_cache_shared defaults)

Properly initialize memory_cache_shared when not explicitly configured and
do not allocate shared memory segments if memory_cache_shared is off.

Prior to this change, shared memory was requested (during rrClaimMemoryNeeds)
before memory_cache_shared was initialized (during rrAfterConfig, unless
explicitly set in squid.conf). Moreover, MemStore::EntryLimit() calculation
ignored memory_cache_shared setting. All that resulted in an attempt to create
shared memory segments where none were needed or possible.

We now have a new Runners Registry (rrFinalizeConfig) that is dedicated to
finalizing complex configuration options, before those configurations options
are used to initialize modules, features, and services. As far as shared
memory is concerned, the initialization order is now:

  * rrFinalizeConfig: finalize memory_cache_shared if needed
  * rrClaimMemoryNeeds: request shared memory pages for the caches
  * rrAfterConfig: create shared memory segments

The same bug 3449 also needed a fix for shared segment paths (trunk r11961).

13 years agoBug 3268: Squid cannot do anything else during ufs/diskd rebuild
Alex Rousskov [Thu, 26 Jan 2012 04:51:21 +0000 (21:51 -0700)] 
Bug 3268: Squid cannot do anything else during ufs/diskd rebuild

Replaced 50-entries/step UFS rebuild logic with 50msec/step logic,
while also ensuring that other events can be processed between steps.

During a swap.state rebuild, progress reporting will now happen
every 4000 entries instead of every 0xFFF entries because humans do not
think in hex. Still no progress reporting for dirty rebuilds based on the
cache directory scans.

The code is based on Rock Store rebuild code. Eventually, the common rebuild
pacing logic among all stores should be merged to avoid code duplication.

Also removed RebuildState::next methods as unused. A copy-paste error?

13 years agoRenamed squid.h to squid-old.h and config.h to squid.h.
Francesco Chemolli [Sun, 22 Jan 2012 14:15:59 +0000 (15:15 +0100)] 
Renamed squid.h to squid-old.h and config.h to squid.h.

13 years agoFixed source-maintenance.sh
Francesco Chemolli [Sun, 22 Jan 2012 13:45:40 +0000 (14:45 +0100)] 
Fixed source-maintenance.sh

Updated guard against checking squid-old.h
Prevented checking libTrie as it uses its own config.h

13 years agoFixed typo in documentation.
Francesco Chemolli [Sun, 22 Jan 2012 11:12:00 +0000 (12:12 +0100)] 
Fixed typo in documentation.

13 years agoDisable OpenSSL SSL/TLS bug workarounds by default
Henrik Nordstrom [Sat, 21 Jan 2012 23:04:54 +0000 (00:04 +0100)] 
Disable OpenSSL SSL/TLS bug workarounds by default

On a closer inspection the set of "harmless" SSL/TLS bug workarounds
set by SSL_OP_ALL is not all of them harmless and reduces the SSL/TLS
strength to some attacks.

To revert to the older mode the ALL option can be set explicitly, but
it's better to understand which bug is encountered and enable only that
specific workaround if needed.

13 years agoRemoved some mentions of squid-old from the documentation.
Francesco Chemolli [Sat, 21 Jan 2012 17:11:05 +0000 (18:11 +0100)] 
Removed some mentions of squid-old from the documentation.

13 years agoSmall fixes.
Francesco Chemolli [Sat, 21 Jan 2012 17:06:38 +0000 (18:06 +0100)] 
Small fixes.

13 years agoFixed comment in source-maintenance.sh
Francesco Chemolli [Sat, 21 Jan 2012 08:08:51 +0000 (09:08 +0100)] 
Fixed comment in source-maintenance.sh

13 years agoClarified and corrected documentation.
Francesco Chemolli [Sat, 21 Jan 2012 08:06:33 +0000 (09:06 +0100)] 
Clarified and corrected documentation.

13 years agoDo not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses.
Alex Rousskov [Fri, 20 Jan 2012 23:28:14 +0000 (16:28 -0700)] 
Do not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses.

The old "stale if hit" logic did not account for cases where the stored stale
response became fresh due to a successful revalidation with the origin server.
When the stored response was stale at the time of the request, we were adding
110 "Response is stale" and even 111 "Revalidation failed" Warning headers to
responses while logging TCP_REFRESH_UNMODIFIED, which is considered a hit.

13 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

13 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

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

13 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

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

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

13 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.

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

13 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

13 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

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

13 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"

13 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

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

13 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.

13 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.

13 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.

13 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

13 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

13 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

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

13 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

13 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

13 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.

13 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

13 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

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

13 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.

13 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.

13 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

13 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.

13 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.

13 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

13 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

13 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.

13 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

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

13 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.

13 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

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

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

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

13 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

13 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

13 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)

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

13 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

13 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

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

13 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)

13 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.

13 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

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

13 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.

13 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

13 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

13 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.

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

13 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.

13 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.

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

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

13 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

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

13 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

13 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.

13 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.

13 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.

13 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.

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

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

13 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.

13 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.

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

13 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

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

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

13 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.

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

13 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.

13 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

13 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.

13 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

13 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.

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

13 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

13 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.

13 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.

13 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