]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
13 years agoBug 1243: Build overrides configured AR setting
Amos Jeffries [Sun, 23 Oct 2011 02:03:09 +0000 (20:03 -0600)] 
Bug 1243: Build overrides configured AR setting

13 years agoext_session_acl: version 1.2
Andrew Beverley [Sun, 23 Oct 2011 01:07:46 +0000 (19:07 -0600)] 
ext_session_acl: version 1.2

This patch makes the following changes to the session helper:

- Removes support for Berkeley DB 1.85
- Adds support for the current Berkeley DB (db.h)
- Adds support for a DB environment (if a directory is specified as
  the path then an environment is created). This gives better
  synchronisation within multiple processes
- Fixes a bug with active mode where LOGIN/LOGOUT did not write to the DB

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 23 Oct 2011 00:16:42 +0000 (18:16 -0600)] 
SourceFormat Enforcement

13 years agoFix fastCheck() default result on multi-line actions.
Amos Jeffries [Sat, 22 Oct 2011 00:42:39 +0000 (13:42 +1300)] 
Fix fastCheck() default result on multi-line actions.

fastCheck() on multiple lines was using the last lines action instead
of the DUNNO state replacement for inversion.

This updated fastCheck() to only use a config lines result state if that
line fully matched. In accordance with documented ACL behaviour.

13 years agoPolished more fatal messages.
Alex Rousskov [Fri, 21 Oct 2011 23:38:50 +0000 (17:38 -0600)] 
Polished more fatal messages.

13 years agoAdded more sources needed by ufs, which some platforms link with testRock
Alex Rousskov [Fri, 21 Oct 2011 23:36:47 +0000 (17:36 -0600)] 
Added more sources needed by ufs, which some platforms link with testRock
via the fs/libfs.la dependency.

13 years agoAdded sources needed by ufs but linked, on some platforms, to testRock
Alex Rousskov [Fri, 21 Oct 2011 22:11:06 +0000 (16:11 -0600)] 
Added sources needed by ufs but linked, on some platforms, to testRock
via the fs/libfs.la dependency.

13 years agoReduced test Rock cache_dir size from 100MB to 10MB to reduce test overheads.
Alex Rousskov [Fri, 21 Oct 2011 22:01:51 +0000 (16:01 -0600)] 
Reduced test Rock cache_dir size from 100MB to 10MB to reduce test overheads.

13 years agoMade fatal shm_open() errors more detailed to triage failing tests/testRock.
Alex Rousskov [Fri, 21 Oct 2011 21:59:16 +0000 (15:59 -0600)] 
Made fatal shm_open() errors more detailed to triage failing tests/testRock.

13 years agoDelete server-side deleteThis()
Christos Tsantilas [Fri, 21 Oct 2011 16:20:42 +0000 (19:20 +0300)] 
Delete server-side deleteThis()

This patch finishes the conversion of ServerStateData into AsyncJob by properly
implementing the doneAll() method and by removing calls to deleteThis() or
replacing with mustStop() calls as appropriate.

The Adaptation::AccessCheck modified to schedule an AsyncJobCall when
access check finishes.

The ServerStateData and ClientHttpRequest classes modified to work with the new
Adaptation::AccessCheck.

This is a Measurement Factory project

13 years agoVarious fixes for Rock store unit tests.
Alex Rousskov [Sun, 16 Oct 2011 04:01:39 +0000 (22:01 -0600)] 
Various fixes for Rock store unit tests.

Also some source maintenance updates.

13 years agoAvoid "double to int" compiler warnings.
Alex Rousskov [Fri, 14 Oct 2011 22:43:20 +0000 (16:43 -0600)] 
Avoid "double to int" compiler warnings.

Could also use integer arithmetic instead of 1e3 double, but it is often safer
to use doubles when it comes to formulas because significant integer rounding
errors are difficult to spot.

13 years agoAdded missing stub to Rock Store test, exposed by layer-02-maximus build test.
Alex Rousskov [Fri, 14 Oct 2011 22:39:03 +0000 (16:39 -0600)] 
Added missing stub to Rock Store test, exposed by layer-02-maximus build test.

13 years agoSMP shared memory cache stats were not collected.
Alex Rousskov [Fri, 14 Oct 2011 16:21:48 +0000 (10:21 -0600)] 
SMP shared memory cache stats were not collected.

"Hot Object" stats were not reported for shared memory cache.

Mean disk object size stats were aggregated inaccurately for SMP.

Moved Store-related stats into a dedicated StoreStats class,
encapsulating memory cache-related (mem), disk cache-related (swap), and
global store (number of objects) stats. Used consistent naming scheme
and a common parent class to make memory and disk stats more alike.

Moved Store stats collection into corresponding Store classes rather
than forcing GetInfo() in stat.cc to know how to deal with all Store stats.

13 years agoAccount for max-swap-rate in swap-timeout handling for Rock.
Alex Rousskov [Fri, 14 Oct 2011 16:00:08 +0000 (10:00 -0600)] 
Account for max-swap-rate in swap-timeout handling for Rock.

Current swap-timeout code does not know about max-swap-rate.  It
simply finds the longest-waiting I/O in disker queues (incoming and
outgoing) and then assumes that the new I/O will wait at least that
long.  The assumption is likely to be wrong when the queue contains
lots of freshly queued requests to disker: Those requests have not
waited long yet, but a max-swap-rate limit will slow them down
shortly.

The patch changes the swap-timeout code to account for max-swap-rate
when dealing with the workers-to-disker queue: If there are N requests
pending, the new one will wait at least N/max-swap-rate seconds.  Also
expected wait time is adjusted based on the queue "balance" member, in
case we have been borrowing time against future I/O already.

13 years agoAdd basic "make check" tests for Rock Store, based on UFS and COSS tests.
Alex Rousskov [Fri, 14 Oct 2011 15:53:02 +0000 (09:53 -0600)] 
Add basic "make check" tests for Rock Store, based on UFS and COSS tests.

13 years agoAdded null pointer guard in HttpStateData::cacheableReply()
Francesco Chemolli [Fri, 14 Oct 2011 14:42:32 +0000 (16:42 +0200)] 
Added null pointer guard in HttpStateData::cacheableReply()

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 14 Oct 2011 01:49:17 +0000 (19:49 -0600)] 
SourceFormat Enforcement

13 years agoLog field width polishing
Christos Tsantilas [Thu, 13 Oct 2011 17:05:25 +0000 (20:05 +0300)] 
Log field width polishing

This patch:
 - converts type of the Token::[width|precision]  members from "unsigned int" to "int"
 - renames the Token::[width|precision] members to Token::[widthMin/widthMax]
 - removes unneeded typecastings

This is a Measurement Factory project

13 years agoPrep for 3.2.0.13 and 3.1.16
Amos Jeffries [Thu, 13 Oct 2011 07:47:10 +0000 (01:47 -0600)] 
Prep for 3.2.0.13 and 3.1.16

13 years agoDocs: polish host_very_strict
Alex Rousskov [Wed, 12 Oct 2011 21:22:33 +0000 (15:22 -0600)] 
Docs: polish host_very_strict

13 years agoAllow non-shared memory caching when there are no cache_dirs.
Alex Rousskov [Wed, 12 Oct 2011 20:56:41 +0000 (14:56 -0600)] 
Allow non-shared memory caching when there are no cache_dirs.

Before this change, we destroyed unused/idle StoreEntries if nobody was voting
to keep them in store_table. That blocked non-shared memory cache from getting
new entries if there were no cache_dirs to vote for them, which is wrong. The
new code keeps unused/idle StoreEntries in store_table if nobody objects.

13 years agoBug 3077: '\' in url query strings cause Digest authentication to fail
Amos Jeffries [Tue, 11 Oct 2011 04:27:57 +0000 (22:27 -0600)] 
Bug 3077: '\' in url query strings cause Digest authentication to fail

13 years agoPolished HelperChildConfig methods. No runtime changes expected.
Alex Rousskov [Mon, 10 Oct 2011 16:18:55 +0000 (10:18 -0600)] 
Polished HelperChildConfig methods. No runtime changes expected.

Removed 3 out of 5 constructors as unused.

Prevented silent conversion from int to HelperChildConfig via a
single-parameter constructor.

Removed destructor and assignment operator for being identical to the
compiler-generated ones and for implying that a copy constructor is missing.

13 years agoFixed typos in the host_verify_strict description.
Alex Rousskov [Mon, 10 Oct 2011 14:39:00 +0000 (08:39 -0600)] 
Fixed typos in the host_verify_strict description.

Frankly, the description is likely to still make little sense to
uninitiated because we do not explain what is "Host vs IP validation"
and what the "additional strict validation comparisons" are. There was
an attempt to explain the latter, but I think it failed. Perhaps there
are more typos that hide the intended meaning?

13 years agoBug 3325: option to selectively enable strict host verify checks.
Amos Jeffries [Mon, 10 Oct 2011 12:21:13 +0000 (06:21 -0600)] 
Bug 3325: option to selectively enable strict host verify checks.

13 years agoHost verify: do not pinn destination IP if URL re-write has been done.
Amos Jeffries [Mon, 10 Oct 2011 11:54:04 +0000 (05:54 -0600)] 
Host verify: do not pinn destination IP if URL re-write has been done.

13 years agoBug 3336: assertion failed: helper.cc:701: 'hlp->childs.n_running > 0'
Amos Jeffries [Mon, 10 Oct 2011 03:28:26 +0000 (21:28 -0600)] 
Bug 3336: assertion failed: helper.cc:701: 'hlp->childs.n_running > 0'

13 years agoFix eCAP build failure with --disable-auth
Amos Jeffries [Mon, 10 Oct 2011 03:27:47 +0000 (21:27 -0600)] 
Fix eCAP build failure with --disable-auth

13 years agoBug 3363: never_direct always 'unable to forward this request at this time'
Amos Jeffries [Sun, 9 Oct 2011 07:51:22 +0000 (20:51 +1300)] 
Bug 3363: never_direct always 'unable to forward this request at this time'

never_direct allow test result was mapping to YES insteaad of NO.

13 years agoAdd directive dns_v4_first to make IPv4 connections before IPv6 is tried.
Amos Jeffries [Sun, 9 Oct 2011 05:44:22 +0000 (23:44 -0600)] 
Add directive dns_v4_first to make IPv4 connections before IPv6 is tried.

Default off, to prefer the faster protocol.

The use-case for this is networks which are IPv6-enabled but stuck
behind slow tunnels and whose upstream is not supporting full transit
services over IP.

13 years agoBug 3337: Http status 200 is not accepted for deny_info
Amos Jeffries [Sun, 9 Oct 2011 05:32:46 +0000 (23:32 -0600)] 
Bug 3337: Http status 200 is not accepted for deny_info

13 years agoBug 3237: seq fault in free() from rfc1035RRDestroy
Joerg Lehrke [Sun, 9 Oct 2011 05:16:18 +0000 (23:16 -0600)] 
Bug 3237: seq fault in free() from rfc1035RRDestroy

13 years agoProperly parse HTTP list headers with embedded 8-bit characters
Henrik Nordstrom [Sat, 8 Oct 2011 18:46:19 +0000 (20:46 +0200)] 
Properly parse HTTP list headers with embedded 8-bit characters

MSIE and maybe other browsers sometimes sends 8-bit high characters
in HTTP headers (and URLs). This was mistakenly read as CTL characters
on platforms with signed char type (i.e. x86 etc).

One visible effect of this was that HTTP Digest authentication failed
in MSIE when following a link with embedded 8-bit or UTF-8 characters.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 7 Oct 2011 00:12:29 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years agoFixed a typo that broke builds with no HAVE_SHM.
Alex Rousskov [Thu, 6 Oct 2011 22:25:28 +0000 (16:25 -0600)] 
Fixed a typo that broke builds with no HAVE_SHM.

13 years agoFix CertficateDB locking scheme
Christos Tsantilas [Thu, 6 Oct 2011 18:18:24 +0000 (21:18 +0300)] 
Fix CertficateDB locking scheme

Currently we are locking every file going to be accessed by CertificateDB code
even if it is not realy needed, because of a more general lock.

This patch:
   - Replace the old FileLocker class with the pair Lock/Locker classes
   - Remove most of the locks in CertificateDB with only two locks one
     for main database locking and one lock for the file contain the
     current serial number.

This is a Measurement Factory project

13 years agoBug 3349: Bad support for adaptation service URIs with '='
Christos Tsantilas [Thu, 6 Oct 2011 18:12:51 +0000 (21:12 +0300)] 
Bug 3349: Bad support for adaptation service URIs with '='

Currently using URIs  which  include "=" is not supported by
ecap_service/icap_service configuration parameters. Also the squid.conf
documentation about ecap_service is outdated.

This patch
- Fixes the [e|i]cap_service line parser to allow URIs with "="
- Changes the [e|i]cap_service configuration parameter to use the following syntax:
   ecap_service id vectoring_point uri [name=value ...]
- Check for duplicated options
- Fixes the related documentation
- Also the older [e|i]cap_service syntax forms are supported:
   ecap_service id vectoring_point [1|0] uri
   ecap_service id vectoring_point [name=value ...] uri
- The "uri" options is not documented but supported.

This is a Measurement Factory project.

13 years agoAdded missing AtomicWordT::Value typedef to the fake AtomicWord API.
Alex Rousskov [Thu, 6 Oct 2011 17:01:19 +0000 (11:01 -0600)] 
Added missing AtomicWordT::Value typedef to the fake AtomicWord API.

13 years agoPolished SMP caching code, primarily to stay out of the way in non-SMP mode.
Alex Rousskov [Thu, 6 Oct 2011 16:41:46 +0000 (10:41 -0600)] 
Polished SMP caching code, primarily to stay out of the way in non-SMP mode.

Do not start useless diskers. Do not assume Rock cache_dirs are present.
Do not require IpcIo DiskIO module to build Rock store.
Check IPC I/O pages limits in Rock store only when using a disker.
Warn about Rock cache_dir disk space waste.
Warn if shared memory cache is enabled in non-SMP mode.
Fake shared memory segments if needed (e.g., we are using Rock cache_dirs with
  no POSIX shared memory support) and possible (e.g., no SMP).

13 years agoAdded max-swap-rate=swaps/sec option to Rock cache_dir.
Alex Rousskov [Thu, 6 Oct 2011 16:38:03 +0000 (10:38 -0600)] 
Added max-swap-rate=swaps/sec option to Rock cache_dir.

The option limits the rate of Rock disk access to smooth out OS disk commit
activity and to avoid blocking Rock diskers (or even other processes) on I/O.
Should be used when swap demand exceeds disk performance limits but the
underlying file system does not slow down incoming I/Os until the situation
gets out of control.

Warn if Rock disker delays are significant.

13 years agoBug 3190: Large HTTP POST stuck after early ICAP 400 error response
Christos Tsantilas [Thu, 6 Oct 2011 08:29:03 +0000 (11:29 +0300)] 
Bug 3190: Large HTTP POST stuck after early ICAP 400 error response

When an ICAP REQMOD service responds with an error to
(or the REQMOD transaction aborts while processing) a large HTTP
request, the HTTP request may get stuck because the request body
buffer gets full and nobody consumes the no-longer-needed content.

The ICAP code quits but leaves the body buffer intact in case the
client-side code wants to bypass the error. After that, nobody consumes
the request body because the buggy client side does not inform the body
pipe that there will be no other consumers, which would have triggered
a noteBodyConsumerAborted() callback and enable auto-consumption or closed
the client connection.

This is a Measurement Factory project

13 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 5 Oct 2011 00:19:46 +0000 (18:19 -0600)] 
SourceFormat Enforcement

13 years agoRefactored HttpHdrCc, with improved MemPools integration and more efficient parsing.
Francesco Chemolli [Tue, 4 Oct 2011 21:27:42 +0000 (23:27 +0200)] 
Refactored HttpHdrCc, with improved MemPools integration and more efficient parsing.
Implemented StringArea class.

13 years agoRemove entryLimitAllowed() TODO from RockSwapDirRr::run().
Dmitry Kurochkin [Tue, 4 Oct 2011 17:29:09 +0000 (21:29 +0400)] 
Remove entryLimitAllowed() TODO from RockSwapDirRr::run().

RockSwapDirRr::run() calls sd->entryLimitAllowed() when sd does not
have a map yet, which causes entryLimitAllowed() to use zero for the
lower limit.  But that OK so we can remove the TODO.

13 years agoWarn about Rock cache_dir disk space waste.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:28:52 +0000 (21:28 +0400)] 
Warn about Rock cache_dir disk space waste.

In some configurations Rock cache_dir may hit the maximum entry limit.
In that case a significant disk space may be wasted.  Before recent
SMP-related changes, there was code to warn the user about such
situations.  The patch resurrects that code, adjusting it as needed to
match the current realities.

13 years agoCheck IPC I/O pages limits in Rock store only when using a disker.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:28:27 +0000 (21:28 +0400)] 
Check IPC I/O pages limits in Rock store only when using a disker.

Shared memory pages are used only when Rock is running with diskers.
Otherwise, Blocking IO is used and there is no need to check for IPC
I/O pages limits.

13 years agoAdd sanity check to Kids::init().
Dmitry Kurochkin [Tue, 4 Oct 2011 17:28:17 +0000 (21:28 +0400)] 
Add sanity check to Kids::init().

13 years agoDo not start useless diskers.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:28:03 +0000 (21:28 +0400)] 
Do not start useless diskers.

Before the change, a disker process was started for each configured
cache_dir.  But not all cache_dirs need a disker: only Rock store
requires one when running in SMP mode.  There was some existing code
to avoid starting useless diskers (see SwapDir::needsDiskStrand and
Config.cacheSwap.n_strands) but it was not complete.  The patch fixes
this issue.

13 years agoDo not require IpcIo DiskIO module to build Rock store.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:27:45 +0000 (21:27 +0400)] 
Do not require IpcIo DiskIO module to build Rock store.

Rock can be used in non-SMP mode with Blocking DiskIO module.

13 years agoRewrite shared memory registry runners using Ipc::Mem::RegisteredRunner.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:27:22 +0000 (21:27 +0400)] 
Rewrite shared memory registry runners using Ipc::Mem::RegisteredRunner.

This allows simpler code and cleaner separation between shared segment
creation and openning.

13 years agoAdd base class for registered runners that work with shared memory.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:26:58 +0000 (21:26 +0400)] 
Add base class for registered runners that work with shared memory.

Shared memory runners do two main things:

* create shared memory segments
* open shared memory segments created earlier

Each runner has to decide whether it needs to create and/or open
shared memory segments.  Common runners share (some) logic in making
this decisions.  The purpose of this patch is to implement this logic
in a single place to allow easy reuse and avoid duplication.

13 years agoWarn if shared memory cache is enabled in non-SMP mode.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:26:29 +0000 (21:26 +0400)] 
Warn if shared memory cache is enabled in non-SMP mode.

13 years agoRemove useless typedef from DeactivateRegistered().
Dmitry Kurochkin [Tue, 4 Oct 2011 17:26:14 +0000 (21:26 +0400)] 
Remove useless typedef from DeactivateRegistered().

13 years agoAdd "fake" shared memory segment implementation.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:25:56 +0000 (21:25 +0400)] 
Add "fake" shared memory segment implementation.

"Fake" shared memory segments are enabled #if a system does not
support POSIX shared memory.  Such segments use regular new to
allocate memory, it is not shared among multiple processes.  The
purpose of the change is to allow code that uses Ipc::Mem::Segment to
run in non-SMP mode (that is when only a single process, except for
master, is running) on systems without POSIX shared memory support.

Note: running SHM-using features in SMP mode still requires POSIX
shared memory support, the patch does not change that.

13 years agoFix comment for Ipc::Mem::Segment::create() method.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:24:59 +0000 (21:24 +0400)] 
Fix comment for Ipc::Mem::Segment::create() method.

It does not fail if a segment with the same name already exists.

13 years agoFix "variable set but not used" GCC 4.6 warnings when building without GSSAPI.
Dmitry Kurochkin [Tue, 4 Oct 2011 17:24:31 +0000 (21:24 +0400)] 
Fix "variable set but not used" GCC 4.6 warnings when building without GSSAPI.

13 years agoMerged from trunk
Francesco Chemolli [Tue, 4 Oct 2011 11:52:17 +0000 (13:52 +0200)] 
Merged from trunk

13 years agoBug fix: a test was flipped during conversion.
Francesco Chemolli [Tue, 4 Oct 2011 10:34:19 +0000 (12:34 +0200)] 
Bug fix: a test was flipped during conversion.

13 years agoMerged from parent (trunk r11763, v3.2.0.12+).
Alex Rousskov [Mon, 3 Oct 2011 20:27:34 +0000 (14:27 -0600)] 
Merged from parent (trunk r11763, v3.2.0.12+).

13 years agoUse atomic int for millisecond-based Balance instead of atomic int64_t.
Alex Rousskov [Mon, 3 Oct 2011 20:19:24 +0000 (14:19 -0600)] 
Use atomic int for millisecond-based Balance instead of atomic int64_t.

Atomic int64_t may cause "undefined reference to __sync_fetch_and_add_8"
linking errors, due to GCC bugs. Those errors can be fixed by building with
CXXFLAGS='-march=i586' but there is no reason to introduce that complexity
as 2^31 milliseconds is 35791 hours which is still plenty for our purposes.

13 years agoWarn if Rock disker delays are significant.
Alex Rousskov [Mon, 3 Oct 2011 20:15:55 +0000 (14:15 -0600)] 
Warn if Rock disker delays are significant.

This may help detect misconfigurations (e.g., too low I/O rate) or bugs.

13 years agoOptimization in HttpHdrCc::packInto : if there is nothing to fill in don't even look
Francesco Chemolli [Mon, 3 Oct 2011 15:44:56 +0000 (17:44 +0200)] 
Optimization in HttpHdrCc::packInto : if there is nothing to fill in don't even look

13 years agoCleanup: only copy error-details.txt once per language
Amos Jeffries [Mon, 3 Oct 2011 10:55:34 +0000 (04:55 -0600)] 
Cleanup: only copy error-details.txt once per language

13 years agoBug 3373: invalid URL in ERR_CACHE_ACCESS_DENIED
David Parks [Mon, 3 Oct 2011 10:41:22 +0000 (23:41 +1300)] 
Bug 3373: invalid URL in ERR_CACHE_ACCESS_DENIED

13 years agoBug 3346: forward.cc:364: "entry->store_status == STORE_PENDING"
Christos Tsantilas [Mon, 3 Oct 2011 10:17:42 +0000 (13:17 +0300)] 
Bug 3346: forward.cc:364: "entry->store_status == STORE_PENDING"

While the server writes the response to Store, the client side may
synchronously abort the entry. This happens, for example, when the
server receives a 304 response and handleIMSReply calls
sendClientOldEntry, which calls storeUnregister with our entry,
resulting in CheckQuickAbort.

Once server store write returns, if the server is done, it calls
FwdState::completed(). At that time, the server does not know that (and
should not care whether) the entry was aborted. Thus, we need to handle
aborted entries in FwdState::completed.

This is a Measurement Factory project.

13 years agoOptimized HttpHdrCc::packInto and clarified its behaviour in comments
Francesco Chemolli [Thu, 29 Sep 2011 06:53:34 +0000 (08:53 +0200)] 
Optimized HttpHdrCc::packInto and clarified its behaviour in comments
Negative values to Cache-Control directives are now explicitly discarded
Clarified documentation

13 years agoExplicitly check that integer-carrying Cache-control directives are positive.
Francesco Chemolli [Wed, 28 Sep 2011 22:42:19 +0000 (00:42 +0200)] 
Explicitly check that integer-carrying Cache-control directives are positive.
Rename MAX_STALE_ALWAYS to MAX_STALE_ANY and changed its representation to very large positive integer.
Implemented internal HttpHdrCc::setValue call.
Removed unnecessarily explicitly-masked StringArea default constructor.

13 years agoImplemented explicit getters/setters for all Cache-Control directives
Francesco Chemolli [Wed, 28 Sep 2011 12:13:22 +0000 (14:13 +0200)] 
Implemented explicit getters/setters for all Cache-Control directives
Moved httpHdrCcPackInto to an HttpHdrCc class member

13 years agoavoided temporary in HttpHdrCc name-to-id lookup
Francesco Chemolli [Tue, 27 Sep 2011 21:48:12 +0000 (23:48 +0200)] 
avoided temporary in HttpHdrCc name-to-id lookup
Started implementing have/set/get/clear combo for all members of HttpHdrCc
Fixed zero-pointer-dereference in http.cc

13 years agoMade HttpHdrCc::mask private.
Francesco Chemolli [Tue, 27 Sep 2011 11:16:01 +0000 (13:16 +0200)] 
Made HttpHdrCc::mask private.

13 years agoImplemented HttpHdrCc::set and isSet to manipulate the mask
Francesco Chemolli [Tue, 27 Sep 2011 10:40:29 +0000 (12:40 +0200)] 
Implemented HttpHdrCc::set and isSet to manipulate the mask

13 years agoImproved HttpHdrCc documentation
Francesco Chemolli [Tue, 27 Sep 2011 06:14:57 +0000 (08:14 +0200)] 
Improved HttpHdrCc documentation
Reverted spurious change in Makefile.am
Fixed potential null pointer dereference in refresh.cc
Reverted unnecessary changes to HttpHeader::getCc
Removed explicit constructor requirement for HttpHdrCc

13 years agoFixed consistency typo in HttpHdrCc.
Francesco Chemolli [Tue, 27 Sep 2011 05:31:10 +0000 (07:31 +0200)] 
Fixed consistency typo in HttpHdrCc.

13 years agoImplemented base/StringArea
Francesco Chemolli [Tue, 27 Sep 2011 05:16:58 +0000 (07:16 +0200)] 
Implemented base/StringArea

13 years agoFixed Makefile.
Francesco Chemolli [Mon, 26 Sep 2011 21:31:34 +0000 (23:31 +0200)] 
Fixed Makefile.

13 years agoInitialize LastIo to avoid huge balance values that effectively disable disker
Alex Rousskov [Mon, 26 Sep 2011 21:05:15 +0000 (15:05 -0600)] 
Initialize LastIo to avoid huge balance values that effectively disable disker
by forcing it to ignore I/O requests for current_time seconds.

13 years agoClarified some auxiliary struct documentation
Francesco Chemolli [Mon, 26 Sep 2011 20:05:40 +0000 (22:05 +0200)] 
Clarified some auxiliary struct documentation

13 years agoInlined getters/setters
Francesco Chemolli [Mon, 26 Sep 2011 19:58:43 +0000 (21:58 +0200)] 
Inlined getters/setters

13 years agoMade some "unset" checks explicit.
Francesco Chemolli [Mon, 26 Sep 2011 19:50:51 +0000 (21:50 +0200)] 
Made some "unset" checks explicit.

13 years ago(no commit message)
Francesco Chemolli [Mon, 26 Sep 2011 06:20:09 +0000 (08:20 +0200)] 

13 years agoCreated getters and setters for HttpHdrCc::min_fresh
Francesco Chemolli [Sun, 25 Sep 2011 13:06:40 +0000 (15:06 +0200)] 
Created getters and setters for HttpHdrCc::min_fresh

13 years agoAuthor: Andrew Beverley <andy@andybev.com>
Henrik Nordstrom [Sun, 25 Sep 2011 01:36:21 +0000 (03:36 +0200)] 
Author: Andrew Beverley <andy@andybev.com>

This patch stops an SSL header file being included when SSL
support has not been requested.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 24 Sep 2011 00:13:48 +0000 (18:13 -0600)] 
SourceFormat Enforcement

13 years agoImplemented getters/setters for HttpHdrCc::stale_if_error
Francesco Chemolli [Fri, 23 Sep 2011 08:36:42 +0000 (10:36 +0200)] 
Implemented getters/setters for HttpHdrCc::stale_if_error
Fixed formatting in HttpHdrCc.c

13 years agoWorkaround: disable translation of error-details.txt
Amos Jeffries [Fri, 23 Sep 2011 00:29:41 +0000 (18:29 -0600)] 
Workaround: disable translation of error-details.txt

po2txt was translating sub-strings inside name: fields.

This is a TEMPORARY measure to prevent breakign any more installations.

13 years agoFixed SwapDir::reconfigure() arguments broken by my poor conflict resolution.
Alex Rousskov [Thu, 22 Sep 2011 22:02:39 +0000 (16:02 -0600)] 
Fixed SwapDir::reconfigure() arguments broken by my poor conflict resolution.

13 years agoFix cache_dir type check during reconfiguration.
Dmitry Kurochkin [Thu, 22 Sep 2011 21:47:32 +0000 (15:47 -0600)] 
Fix cache_dir type check during reconfiguration.

SwapDir::type() returns C strings which should be compared with
strcmp(3) instead of checking pointers for equality.

13 years agoRemove SwapDir::reconfigure() arguments since they are not used.
Dmitry Kurochkin [Thu, 22 Sep 2011 21:42:46 +0000 (15:42 -0600)] 
Remove SwapDir::reconfigure() arguments since they are not used.

Before the change, SwapDir::reconfigure() took index and path
arguments, but none of them was actually used: neither index nor path
can be changed during reconfigure.  And both index and path are
available as SwapDir members so there is no reason to have these
arguments.

13 years agoIgnore and warn about attempts to reconfigure static Rock store options.
Dmitry Kurochkin [Thu, 22 Sep 2011 21:36:59 +0000 (15:36 -0600)] 
Ignore and warn about attempts to reconfigure static Rock store options.

Some Rock store options cannot be changed dynamically: path, size, and
max-size.  Before the change, there were no checks during reconfigure
to prevent changing these options.  This may lead to Rock cache
corruption and other bugs.  The patch adds necessary checks to Rock
store code.  If user tries to change an option that cannot be updated
dynamically, a warning is reported and the value is left unchanged.

13 years agoBug fix: "(ssl_crtd): Cannot add certificate to db" when updating expired cert
Christos Tsantilas [Thu, 22 Sep 2011 16:37:55 +0000 (19:37 +0300)] 
Bug fix: "(ssl_crtd): Cannot add certificate to db" when updating expired cert

When ssl_crtd helper needs to add a fresh certificate to the database but
finds an expired certificate already stored, ssl_crtd deletes the expired
certificate file from disk before adding the fresh one. However, the addition
still fails because the expired certificate was not removed from database
indexes.

This fix:
  - Adds code to update database indexes upon deletion of a row.
  - Polishes certificates deletion code to avoid duplication.

TODO: Report failure details to Squid and make certificate-specific failures
not fatal for the ssl_crtd helper.

This is a Measurement Factory project.

13 years agoBug 3351: FTP timeout causing "store_status == STORE_PENDING" assertion
Alex Rousskov [Thu, 22 Sep 2011 15:23:11 +0000 (09:23 -0600)] 
Bug 3351: FTP timeout causing "store_status == STORE_PENDING" assertion

If the entry was aborted while we were timing out, do not attempt to
write the timeout error message to it.

TODO: Other FTP code should call abortOnBadEntry() instead of testing for
ENTRY_ABORTED and calling abortTransaction().

13 years agoimplemented getters and setters for HttpHdrCc::max_stale
Francesco Chemolli [Thu, 22 Sep 2011 13:59:53 +0000 (15:59 +0200)] 
implemented getters and setters for HttpHdrCc::max_stale

13 years agoRenamed include guard for HttpHdrCc
Francesco Chemolli [Thu, 22 Sep 2011 13:45:49 +0000 (15:45 +0200)] 
Renamed include guard for HttpHdrCc

13 years agoSTUB: wordlist
Amos Jeffries [Thu, 22 Sep 2011 02:14:15 +0000 (14:14 +1200)] 
STUB: wordlist

13 years agoBug 3355: configure setting --with-swapdir ignored by netdb
Peter Pramberger [Thu, 22 Sep 2011 00:46:26 +0000 (18:46 -0600)] 
Bug 3355: configure setting --with-swapdir ignored by netdb

13 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 22 Sep 2011 00:15:50 +0000 (18:15 -0600)] 
SourceFormat Enforcement

13 years agoTemporary fix: Avoid killing Coordinator with unregistered cache mgr actions take09
Alex Rousskov [Wed, 21 Sep 2011 18:07:29 +0000 (12:07 -0600)] 
Temporary fix: Avoid killing Coordinator with unregistered cache mgr actions
that cause isOpen() assertions.

Same as trunk r11748.

13 years agoTemporary fix: Avoid killing Coordinator with unregistered cache mgr actions
Alex Rousskov [Wed, 21 Sep 2011 18:05:55 +0000 (12:05 -0600)] 
Temporary fix: Avoid killing Coordinator with unregistered cache mgr actions
that cause isOpen() assertions.

If a worker forwards a cache manager request to Coordinator and Coordinator
does not have that action registered, CacheManager::createRequestedAction()
throws (as it should) and Mgr::Request cleanup asserts when its half-baked
connection tries to close a not-yet-imported socket descriptor.

This workaround catches the exception, reports it, and manually closes the
socket descriptor. It also prevents an ACK response from being sent to the
worker, which triggers a worker timeout.

Mid-term TODO: Coordinator should register all actions that are known to kids.
Should Coordinator respond with an error instead of relying on a timeout?

Long-term TODO: Consider an API where cache manager responses can be
aggregated and formatted by Coordinator without knowing action-specific
details. After all, there are not so many types of action information (size,
count, rate, etc.) and most actions have simple reporting formats. Currently,
it is awkward to guarantee that Coordinator and all workers know all actions,
especially when some actions may be specific to non-worker kids such as
Coordinator and diskers.

13 years agoImplemented HttpHdrCc::s_maxage getters and setters and value-based "unset" state.
Francesco Chemolli [Wed, 21 Sep 2011 07:52:42 +0000 (09:52 +0200)] 
Implemented HttpHdrCc::s_maxage getters and setters and value-based "unset" state.