]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
12 years agoPortability: squid provides strtoll()
Amos Jeffries [Sat, 6 Oct 2012 02:12:35 +0000 (20:12 -0600)] 
Portability: squid provides strtoll()

12 years agoBug 3658: ERR_ZERO_SIZE errors propagates out even after successful retry
Christos Tsantilas [Thu, 4 Oct 2012 11:53:31 +0000 (05:53 -0600)] 
Bug 3658: ERR_ZERO_SIZE errors propagates out even after successful retry

12 years agoBug 3660: ACLFilledChecklist::fd set with wrong fd for sslproxy_cert_error
Christos Tsantilas [Wed, 3 Oct 2012 01:08:20 +0000 (19:08 -0600)] 
Bug 3660: ACLFilledChecklist::fd set with wrong fd for sslproxy_cert_error

The Config.ssl_client.cert_error uses the server-side connection fd instead of
the client-side connection fd.

12 years agoMake IPC base path absolute in testRock
Francesco Chemolli [Mon, 24 Sep 2012 11:10:23 +0000 (05:10 -0600)] 
Make IPC base path absolute in testRock

12 years agoRegression fix: Handle dstdomain duplicates and overlapping names better
Amos Jeffries [Mon, 24 Sep 2012 11:08:52 +0000 (05:08 -0600)] 
Regression fix: Handle dstdomain duplicates and overlapping names better

Since 3.2 changes to dstdomain overlap detection teh case of duplicate
wildcards has become a fatal error needlessly.

This silently ignores all exact duplicates, even if they are wildcards.

Also, adjust the message display to always display the longer of the
domains first. Since we are dealing with sub-domains it is the most
reliable indicator of which should be removed to safely fix the detected
issue.

12 years agoPrep for 3.1.21 and 3.2 release notes
Amos Jeffries [Sun, 23 Sep 2012 09:20:43 +0000 (03:20 -0600)] 
Prep for 3.1.21 and 3.2 release notes

12 years agoBug 3648: Polish String class files
Reinhard Posmyk [Sun, 23 Sep 2012 08:40:08 +0000 (02:40 -0600)] 
Bug 3648: Polish String class files

Fix to correct function parameter const correctness.

Also polishes whitespace to match Squid coding guidelines.

12 years agoBug 3647: parsing hier_code acl fails
Alex Rousskov [Sat, 22 Sep 2012 03:14:27 +0000 (21:14 -0600)] 
Bug 3647: parsing hier_code acl fails

12 years agoDo not reuse persistent connections for PUTs to avoid ERR_ZERO_SIZE_OBJECT.
Alex Rousskov [Sat, 22 Sep 2012 03:12:33 +0000 (21:12 -0600)] 
Do not reuse persistent connections for PUTs to avoid ERR_ZERO_SIZE_OBJECT.

A compliant proxy may retry PUTs, but Squid lacks the [rather complicated]
code required to protect the PUT request body from being nibbled during the
first try or [also tricky] code to send 100-continue expectation requiredto
delay body sending. Thus, Squid cannot safely retry some PUTs today, and
FwdState::checkRetriable() must return false for all PUTs, to avoid
bogus ERR_ZERO_SIZE_OBJECT errors (especially for clients that did not
reuse a pconn and, hence, may not be ready to handle/retry an error response).

In theory, requests with safe or idempotent methods other than PUT might have
bodies so we apply the same logic to them as well.

This reopens Squid bug #3398, undoing trunk r11859 commit which attempted
to close that bug.

12 years agoDo not chunk responses carrying a Content-Range header.
Alex Rousskov [Sat, 22 Sep 2012 03:11:24 +0000 (21:11 -0600)] 
Do not chunk responses carrying a Content-Range header.

When Squid forwards a response with a Content-Range header,
ClientSocketContext::socketState() detects the end of the response range(s)
and returns STREAM_*COMPLETE to ClientSocketContext::writeComplete().
The latter thinks that the writing of the response to the client must be
over and calls keepaliveNextRequest() instead of writing the last-chunk
(if any). If the to-client response was chunked, the client gets stuck
waiting for that missing last-chunk.

The multipart Range request case was already excluded from chunking (or it
would probably suffer from the same problem). With this change, no
Content-Range responses will be chunked.

N.B. Some servers send Content-Range responses to basic GET requests
without a Range header, so the problem affects more than just Range requests.

TODO: A proper fix would be to rewrite ClientSocketContext::writeComplete()
and other code so that it does not mix internal ClientStream completion with
[possibly chunk-encoded] writing completion. This should probably be done
along with fixing ClientSocketContext::socketState() and other state-checking
code to ignore to-client persistence (flags.proxy_keepalive), which is not
related to the internal ClientStream state.

12 years agoBug 3615: configure check for default max number of FDs is broken
Amos Jeffries [Sun, 9 Sep 2012 10:06:53 +0000 (04:06 -0600)] 
Bug 3615: configure check for default max number of FDs is broken

12 years agoFix maximum_single_addr_tries upgrade
Amos Jeffries [Sun, 9 Sep 2012 10:05:51 +0000 (04:05 -0600)] 
Fix maximum_single_addr_tries upgrade

12 years agoBug 3622: peerClearRRStart scheduling multiple events
Amos Jeffries [Sun, 9 Sep 2012 10:05:22 +0000 (04:05 -0600)] 
Bug 3622: peerClearRRStart scheduling multiple events

12 years agoBug 3626: Forwarding loops on intercepted traffic
Amos Jeffries [Sun, 9 Sep 2012 10:04:39 +0000 (04:04 -0600)] 
Bug 3626: Forwarding loops on intercepted traffic

Changes to interception handling in 3.2 series (namely the preference
for using ORIGINAL_DST) have increased the chances that misconfigured
network systems involving Squid will hit forwarding loops.

Two instances are currently known:
 * passing forward-proxy traffic to a interception port.
 * NAT performed on a separate box.

This enacts an old TODO by removing the loop detection bypass for
intercepted traffic and accelerated traffic. Now we always check for
loops regardless of how the request was received.

NOTE: accel mode was only included due to the TODO.
      If problems are found there it can be re-instated.

12 years agoMake CpuAffinitySet::applied() method non-const.
Dmitry Kurochkin [Sun, 9 Sep 2012 10:03:38 +0000 (04:03 -0600)] 
Make CpuAffinitySet::applied() method non-const.

According to CPU_SET(3) and, apparently, on some systems (e.g.,
OpenSuSE 10.3) CPU_COUNT macro expects a non-const argument.  The
patch fixes build error on these systems.

12 years agoBug 3609: several RADIUS helper improvements
Alan Mizrahi [Sun, 9 Sep 2012 09:54:47 +0000 (03:54 -0600)] 
Bug 3609: several RADIUS helper improvements

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 9 Sep 2012 02:19:55 +0000 (20:19 -0600)] 
SourceFormat Enforcement

12 years agoBug 3616: Retrieve client connection for ACL checks from the related HttpRequest...
Christos Tsantilas [Sat, 8 Sep 2012 05:27:54 +0000 (23:27 -0600)] 
Bug 3616: Retrieve client connection for ACL checks from the related HttpRequest object

This patch enable SSL client certificate ACL checks (user_cert and ca_cert)
in all cases the client connection information can retrieved from the related
HttpRequest object, eg when making peering decisions (peer_cache_access ACL).

Also fixes assertion failure caused by acl dst on transparent proxy.

Discussed under the "Supply client connection and IDENT information to
peer_cache_access ACL check" thread on squid-dev.

This is a Measurement Factory project

12 years agoFix 'error: continue statement not within a loop'
Amos Jeffries [Wed, 29 Aug 2012 14:38:29 +0000 (08:38 -0600)] 
Fix 'error: continue statement not within a loop'

12 years agoRegression: login=PASS send no credentials when none available.
Amos Jeffries [Wed, 29 Aug 2012 03:36:29 +0000 (21:36 -0600)] 
Regression: login=PASS send no credentials when none available.

login=PASS should act like PASSTHRU, sending no credentials header, when
no client supplied OR external ACL credentials are available.
3.2 has been found wrongly adding the username "PASS" in this case.

12 years agoBug 3605: memory leak in Negotiate authentication
Daniel Walter [Wed, 29 Aug 2012 03:19:21 +0000 (21:19 -0600)] 
Bug 3605: memory leak in Negotiate authentication

12 years agoMacOS: fix AddrInfo default flags
Amos Jeffries [Wed, 29 Aug 2012 03:14:58 +0000 (21:14 -0600)] 
MacOS: fix AddrInfo default flags

12 years agoImprove support for clang compilers
Francesco Chemolli [Wed, 29 Aug 2012 03:14:12 +0000 (21:14 -0600)] 
Improve support for clang compilers

clang++ doesn't support c++ variable arrays for non-pod types.
Change variable arrays to dynamically-allocated arrays, Ipc::QueueReaders,
Ipc::StoreMap and Ipc::Mem::PageStack

12 years ago3.2.1 SQUID_3_2_1
Amos Jeffries [Wed, 15 Aug 2012 03:22:50 +0000 (21:22 -0600)] 
3.2.1

12 years agoPrep for 3.2.1
Amos Jeffries [Tue, 14 Aug 2012 23:41:47 +0000 (17:41 -0600)] 
Prep for 3.2.1

12 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 13 Aug 2012 02:27:09 +0000 (20:27 -0600)] 
SourceFormat Enforcement

12 years agoBug 3605: memory leak in peer selection
Amos Jeffries [Sun, 12 Aug 2012 09:12:23 +0000 (03:12 -0600)] 
Bug 3605: memory leak in peer selection

12 years agoBug 3478: workaround: better default handling without -DSTRICT_ORIGINAL_DST
Amos Jeffries [Fri, 10 Aug 2012 05:47:13 +0000 (23:47 -0600)] 
Bug 3478: workaround: better default handling without -DSTRICT_ORIGINAL_DST

This extends the -DSTRICT_ORIGINAL_DST compile-time flag to include the
logics listing ORIGINAL_DST as first preferred destination.

Which makes ORIGINAL_DST a swap-in replacement for DIRECT and enables
never_direct, always_direct, prefer_direct configuration to apply.

13 years ago3.2.0.19 SQUID_3_2_0_19
Amos Jeffries [Thu, 2 Aug 2012 12:13:35 +0000 (06:13 -0600)] 
3.2.0.19

13 years agoSkip Failure Ratio calculations entirely when ICP is disabled.
Amos Jeffries [Thu, 2 Aug 2012 03:32:26 +0000 (21:32 -0600)] 
Skip Failure Ratio calculations entirely when ICP is disabled.

Also, mention ICP in the logged error message. unqualified 'HIT' confuses
people (self included) more familiar with the HTTP type of HIT responses.

13 years agoSupport -DFAILURE_MODE_TIME=n compiler flag
Amos Jeffries [Thu, 2 Aug 2012 03:31:52 +0000 (21:31 -0600)] 
Support -DFAILURE_MODE_TIME=n compiler flag

This value determins at compile-time how long Squid spends in HIT-only
mode after the failure ratio goes over 1.0. see checkFailureRatio() in
src/client_side_request.cc for details on the ratio.

This flag is supported to remove the need for patching when alteration
is required.

13 years agoMore GCC 4.2 dependency fixes
Amos Jeffries [Thu, 2 Aug 2012 03:15:57 +0000 (21:15 -0600)] 
More GCC 4.2 dependency fixes

13 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 31 Jul 2012 00:48:27 +0000 (18:48 -0600)] 
SourceFormat Enforcement

13 years agoRemove unnecessary stub_comm
Amos Jeffries [Mon, 30 Jul 2012 20:52:37 +0000 (14:52 -0600)] 
Remove unnecessary stub_comm

13 years agoGCC 4.2 dependencies
Amos Jeffries [Mon, 30 Jul 2012 08:56:58 +0000 (02:56 -0600)] 
GCC 4.2 dependencies

13 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 30 Jul 2012 00:44:27 +0000 (18:44 -0600)] 
SourceFormat Enforcement

13 years agoBug 3478: Allow peer selection
Amos Jeffries [Sun, 29 Jul 2012 11:26:30 +0000 (05:26 -0600)] 
Bug 3478: Allow peer selection

This re-enables Squid peer selection algorithms for intercepted
traffic which has failed Host header verification.

When host verification fails Squid will use, in order of preference:
 * an already PINNED server connection
 * the client ORIGINAL_DST details
 * cache_peer as chosen by selection algorithms

NOTE: whenever DIRECT is selected by routing algorithms the
      ORIGINAL_DST is used instead.

Peer selection results are updated to display PINNED and
ORIGINAL_DST alongside DIRECT and cache_peer.

SECURITY NOTE:

  At this point Squid will pass the request to cache_peer using the
  non-trusted Host header in their URLs. Meaning that the peers
  may still be poisoned by CVE-2009-0801 attacks. Only the initial
  intercepting proxy is protected.

  Full protection against CVE-2009-0801 can be enjoyed by building
  Squid with the -DSTRICT_HOST_VERIFY compile-time flag. This will
  make the peers unreachable for intercepted traffic where the
  Host verification has failed.

13 years agoBug 3580: IDENT request makes squid crash
Amos Jeffries [Sun, 29 Jul 2012 11:25:49 +0000 (05:25 -0600)] 
Bug 3580: IDENT request makes squid crash

13 years agoRelease Notes: update CONTRIBUTORS to match patch authors list
Amos Jeffries [Sat, 28 Jul 2012 05:59:59 +0000 (23:59 -0600)] 
Release Notes: update CONTRIBUTORS to match patch authors list

13 years agoMerged Postfix-Prefix branch: refactor inc/decrement operators from postfix to prefix...
Francesco Chemolli [Sat, 28 Jul 2012 05:38:50 +0000 (23:38 -0600)] 
Merged Postfix-Prefix branch: refactor inc/decrement operators from postfix to prefix form.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 28 Jul 2012 01:09:31 +0000 (19:09 -0600)] 
SourceFormat Enforcement

13 years agoBug 3568: Consolidate external_acl_form config dumping a bit and add missing percent...
Robert Collins [Fri, 27 Jul 2012 04:31:36 +0000 (22:31 -0600)] 
Bug 3568: Consolidate external_acl_form config dumping a bit and add missing percent dumper.

13 years agoBug 3593: socket failure: Address family not supported by protocol
Amos Jeffries [Fri, 27 Jul 2012 04:28:30 +0000 (22:28 -0600)] 
Bug 3593: socket failure: Address family not supported by protocol

13 years agoAdded missing cbdata debugging so that find-alive.pl can find cbdata leaks.
Alex Rousskov [Fri, 27 Jul 2012 04:08:16 +0000 (22:08 -0600)] 
Added missing cbdata debugging so that find-alive.pl can find cbdata leaks.

13 years agoConvert AccessLogEntry class to RefCountable
Christos Tsantilas [Fri, 27 Jul 2012 04:06:32 +0000 (22:06 -0600)] 
Convert AccessLogEntry class to RefCountable

The AccessLogEntry objects currently are only members of the ClientHttpRequest
objects. There are cases where we need to access AccessLogEntry from server
side objects to retrieve already stored informations for the client request and use it in
server side code with format/* interface (eg use Format::Format::assemble
inside http.cc)

This patch convert AccessLogEntry class to RefCountable to allow link it with
other than the ClientHttpRequest objects.

This is a Measurement Factory project.

13 years agoCleanup: Remove unnecessary todo marker in stub_debug.cc
Francesco Chemolli [Fri, 27 Jul 2012 03:57:58 +0000 (21:57 -0600)] 
Cleanup: Remove unnecessary todo marker in stub_debug.cc

13 years agoAdd helper macro for parser deprecation notes
Amos Jeffries [Fri, 27 Jul 2012 03:53:06 +0000 (21:53 -0600)] 
Add helper macro for parser deprecation notes

When '-k parse' is used deprecation notices and upgrade help messages etc
need to be bumped consistently up to level-0 and this macro will help
reducing the (?:) code mistakes.

13 years agoAdded a todo to avoid a pointless validation loop when validation (-S) is not requested.
Alex Rousskov [Sat, 21 Jul 2012 01:29:37 +0000 (19:29 -0600)] 
Added a todo to avoid a pointless validation loop when validation (-S) is not requested.

13 years agoAvoid bogus "Disk space over limit" warnings when rebuidling dirty ufs index.
Alex Rousskov [Sat, 21 Jul 2012 01:28:42 +0000 (19:28 -0600)] 
Avoid bogus "Disk space over limit" warnings when rebuidling dirty ufs index.

Subtract sizes of added-then-rejected entries while loading ufs cache index.

Before SMP changes, the ufs code was incorrectly ignoring the size of
loaded-but-not-yet-validated entries, leading to cache disk overflows.
After SMP changes, the ufs code was not subtracting sizes of
loaded-but-then-rejected entries, leading to bogus "Disk space over
limit" warnings. Now we correctly account for both kinds of entries.

13 years agoSilence IOS 15.1 unknown capabilities messages.
Amos Jeffries [Sat, 21 Jul 2012 01:27:05 +0000 (19:27 -0600)] 
Silence IOS 15.1 unknown capabilities messages.

Its nice to know when new capabilities are added.
But we don't need to report after being informed about them.

TODO: reduce the message to once every thousand or so.
  But be careful to identify what different type numbers exist.

13 years agoBug 3478: Partial fix: Connection-auth on intercepted connections is broken
Christos Tsantilas [Sat, 21 Jul 2012 01:26:27 +0000 (19:26 -0600)] 
Bug 3478: Partial fix: Connection-auth on intercepted connections is broken

Currenty in the case of intercepted connections each request is open a new
connection to the destination server, even if the connection is a valid pinned
connection.
This patch fixes this problem and reuses pinned connections on intercepted
requests.

This is a Measurement Factory project

13 years agoBug 3551: store_rebuild.cc:116: "store_errors == 0" assertion
Alex Rousskov [Sat, 21 Jul 2012 01:16:32 +0000 (19:16 -0600)] 
Bug 3551: store_rebuild.cc:116: "store_errors == 0" assertion

Fail with an explanation instead of asserting. The assertion fails when a ufs
cache_dir's swap.state has inconsistencies AND the user starts Squid with a -S
command line option. Normally, such inconsistencies are ignored and many of
them are benign.  For example, a missing cache file with an ADD record in
swap.state is such an inconsistency.

The -S option was meant to help developers troubleshoot inconsistencies by
analyzing core dumps, but (a) admins treat assertions as Squid bugs and file
bug reports and (b) in most cases, it is really difficult to find the
inconsistency when Squid asserts after detecting all of them (and leaving the
detection context).

We now explicitly tell the admin what their options are and quit instead of
asserting.

TODO: Consider adding a ufs cache_dir option that checks for and removes
inconsistencies instead of not checking at all (default) or checking and
quitting (-S). This is difficult because some valid cache entries may look
inconsistent while they are being updated and some invalid cache entries
are not visible to Squid without a full directory scan.

13 years agoBug 3525: Do not resend nibbled PUTs and avoid "mustAutoConsume" assertion.
Alex Rousskov [Sat, 21 Jul 2012 01:14:53 +0000 (19:14 -0600)] 
Bug 3525: Do not resend nibbled PUTs and avoid "mustAutoConsume" assertion.

The connected_okay flag was not set when we were reusing the connection.
The unset flag overwrote bodyNibbled() check, allowing FwdState to retry
a PUT after the failed transaction consumed some of the request body
buffer, triggering BodyPipe.cc:239: "mustAutoConsume" assertion.

We now set the connected_okay flag as soon as we get a usable connection
and do not allow it to overwrite the bodyNibbled() check (just in case).

13 years agoBug 3556 Workaround: epoll assertion failed: comm.cc:1093: isOpen(fd)
Amos Jeffries [Sat, 21 Jul 2012 01:09:39 +0000 (19:09 -0600)] 
Bug 3556 Workaround: epoll assertion failed: comm.cc:1093: isOpen(fd)

13 years agoRestore memory caching ability lost since r11969.
Dmitry Kurochkin [Tue, 17 Jul 2012 11:41:40 +0000 (05:41 -0600)] 
Restore memory caching ability lost since r11969.
Honor maximum_object_size_in_memory for non-shared memory cache.

Since r11969, Squid calls trimMemory() for all entries to release unused
MemObjects memory. Unfortunately, that revision also started trimming objects
that could have been stored in memory cache later. Trimmed objects are no
longer eligible for memory caching.

It is possible that IN_MEMORY check in StoreEntry::trimMemory() was preventing
excessive trimming in the past, but after SMP changes, IN_MEMORY flag is set
only after the object is committed to a memory cache in
StoreController::handleIdleEntry(), so we cannot rely on it. For example:

  clientReplyContext::removeStoreReference()

    storeUnregister()
      StoreEntry::swapOut()
        StoreEntry::trimMemory()
          StoreEntry::releaseRequest()

    StoreEntry::unlock()
      StoreController::handleIdleEntry() // never get here because entry is
        set IN_MEMORY status             // already marked for release

This change adds StoreController::keepForLocalMemoryCache() and
MemStore::keepInLocalMemory() methods to check if an entry could be stored in
a memory cache (and, hence, should not be trimmed). The store-related part of
the trimming logic has been moved from StoreEntry::trimMemory() to
StoreController::maybeTrimMemory(). StoreEntry code now focuses on checks that
are not specific to any memory cache settings or admission policies.

These changes may resulted in Squid honoring maximum_object_size_in_memory for
non-shared memory cache. We may have been ignoring that option for non-shared
memory caches since SMP changes because the check for it was specific to a
shared memory cache.

13 years agoPolish: improve debug about which helper FD are failing
Amos Jeffries [Tue, 17 Jul 2012 11:40:17 +0000 (05:40 -0600)] 
Polish: improve debug about which helper FD are failing

13 years agoBug 3577: File Descriptors not properly closed in trunk r12185.
Amos Jeffries [Mon, 16 Jul 2012 06:28:20 +0000 (00:28 -0600)] 
Bug 3577: File Descriptors not properly closed in trunk r12185.
Bug 3583: Server connection stuck after TCP_REFRESH_UNMODIFIED.

These changes fix FD leaks and stuck connections under two conditions:

1) Client aborts while Squid's server-side establishes a connection

Bug 3577: When a client quits while ConnOpener is trying to open the
connection to the next hop, FwdState cancels its ConnOpener callback.
ConnOpener notices that when trying to connect again and quits before
establishing a connection. The ConnOpener cleanup code did not close the
temporary FD used for establishing the connection. It did call fd_close(),
but fd_close() does not close the FD, naturally.

ConnOpener was probably leaking the temporary FD in other error handling
cases as well. It was never closed unless the connection was successful.

2) Client aborts after Squid's server-side established a connection:

Bug 3583: When a client aborts the store entry after receiving an HTTP 304 Not
Modified reply in response to a cache refreshing IMS request, HttpStateData
notices an aborted Store entry (after writing the reply to store), but does
virtually nothing, often resulting in a stuck server connection, leaking a
descriptor.  Now we abort the server-side transaction in this case.

Bug 3577: Similarly, when a client disconnects after Squid started talking to
the origin server but before Squid received a [complete] server response,
HttpStateData notices an aborted Store entry (during the next read from the
origin server), but does virtually nothing, often resulting in a stuck server
connection, leaking a descriptor. Now we abort the server-side transaction in
this case.

FwdState now also closes the server-side connection, if any, when the client
aborts the store entry and FwdState::abort() callback is called. This helps
reduce the number of concurrent server-side connections when clients abort
connections rapidly as Squid no longer has to wait for the server-side I/O to
notice that the entry is gone. The code to close the connection was temporary
removed in trunk r10057.1.51.

13 years agoLog original async call cancellation reason, not just the repeated ones.
Alex Rousskov [Mon, 16 Jul 2012 06:22:22 +0000 (00:22 -0600)] 
Log original async call cancellation reason, not just the repeated ones.

13 years agoBug 3584: Detection of setresuid() is broken
Ole Christensen [Mon, 16 Jul 2012 06:21:08 +0000 (00:21 -0600)] 
Bug 3584: Detection of setresuid() is broken

13 years agocache.log analysis: Add a pattern to report alive (opened and not closed) FDs.
Alex Rousskov [Fri, 13 Jul 2012 11:54:51 +0000 (05:54 -0600)] 
cache.log analysis: Add a pattern to report alive (opened and not closed) FDs.

13 years ago[request|reply]_header_* manglers fixes to handle custom headers
Alex Rousskov [Fri, 13 Jul 2012 11:53:18 +0000 (05:53 -0600)] 
[request|reply]_header_* manglers fixes to handle custom headers

This patch fix the [request|reply]_header_[access|replace] configuration
parameters to support custom headers. Before this patch the user was able
to remove/replace/allow all custom headers using the "Other" as header name.

This is a Measurement Factory project.

13 years ago3.2.0.18 version tag SQUID_3_2_0_18
Amos Jeffries [Fri, 29 Jun 2012 01:37:34 +0000 (19:37 -0600)] 
3.2.0.18 version tag

13 years ago3.2.0.18
Amos Jeffries [Fri, 29 Jun 2012 01:34:08 +0000 (19:34 -0600)] 
3.2.0.18

13 years agoFix 'expected initializer before STUB_RETVAL'
Amos Jeffries [Thu, 28 Jun 2012 09:35:50 +0000 (03:35 -0600)] 
Fix 'expected initializer before STUB_RETVAL'

13 years agoLanguage Updates: fr, hy, pt_BR
Various Translators [Thu, 28 Jun 2012 08:16:48 +0000 (02:16 -0600)] 
Language Updates: fr, hy, pt_BR

13 years agoDo not double-escape %R on deny_info redirects
Amos Jeffries [Thu, 28 Jun 2012 05:15:44 +0000 (23:15 -0600)] 
Do not double-escape %R on deny_info redirects

13 years agoBug 3576: ICY streams being Transfer-Encoding:chunked
Amos Jeffries [Thu, 28 Jun 2012 05:15:20 +0000 (23:15 -0600)] 
Bug 3576: ICY streams being Transfer-Encoding:chunked

13 years agoFix build with GCC 4.7 (and probably other C++11 compilers).
Dmitry Kurochkin [Thu, 28 Jun 2012 05:14:18 +0000 (23:14 -0600)] 
Fix build with GCC 4.7 (and probably other C++11 compilers).

User-defined literals introduced by C++11 break some previously valid
code, resulting in errors when building with GCC v4.7. For example:

  error: unable to find string literal operator 'operator"" PRIu64'

In particular, whitespace is now needed after a string literal and
before something that could be a valid user-defined literal.  See
"User-defined literals and whitespace" section at [1] for more details.

The patch adds spaces between string literals and macros.

[1] http://gcc.gnu.org/gcc-4.7/porting_to.html

13 years agoDo not report the same job multiple times.
Alex Rousskov [Thu, 28 Jun 2012 05:13:09 +0000 (23:13 -0600)] 
Do not report the same job multiple times.

13 years agoCleanup: disconnect Authentication and URL-rewrite callback handlers
Amos Jeffries [Thu, 28 Jun 2012 05:12:14 +0000 (23:12 -0600)] 
Cleanup: disconnect Authentication and URL-rewrite callback handlers

The authentication handlers were for some reason using RH (rewrite helper)
callback typedef. But specifying it as a fatal error if the char*
parameter was used in auth.

Assign a new callback typedef AUTHCB for use by authentication callers.

This allows auth callers to use different parameters (none) and to avoid
possibly fatal mistakes when coding new auth modules.

13 years agoAccount for Store disk client quota when bandwidth-limiting the server.
Alex Rousskov [Thu, 28 Jun 2012 05:11:18 +0000 (23:11 -0600)] 
Account for Store disk client quota when bandwidth-limiting the server.

It is not clear why the store client type matters when
MemObject::mostBytesAllowed() is trying to find the maximum delay pool
quota for reading from the next hop HTTP server.  Whether the client(s)
are reading from disk or RAM, the corresponding server-side bandwidth
ought to be limited.

This code was removed as a part of bug 3462 investigation, but it is not
needed to fix bug 3462.

13 years agoBug 3462: Delay Pools and ICAP
Julien Pinon [Thu, 21 Jun 2012 00:39:01 +0000 (18:39 -0600)] 
Bug 3462: Delay Pools and ICAP

Allow StoreEntry::bytesWanted() API to ignore delay pools. Use that
feature when shoveling adapted response body from ICAP/eCAP BodyPipe
into Store.

If we do not ignore delay pools in
ServerStateData::handleMoreAdaptedBodyAvailable() context, and our pool
quota is exhausted, we will stop reading from the adaptation BodyPipe,
but there is no code/API to notify a BodyPipe reader when the quota
becomes available again.  With no reads from the pipe, the ICAP service
stops sending more adapted body data and possibly stops reading the
virgin body data from Squid, resulting in a stuck ICAP RESPMOD and the
master HTTP transaction.

We do need to call StoreEntry::bytesWanted() in this context because
otherwise Squid may run out of RAM (Squid bug #2619). The fix for that
problem inadvertently created this bug when delay pools were enabled.

Long-term, a "kick BodyPipe consumer when there is quota" code should be
added, and delay pools should be enabled for ICAP responses, but with
enough knobs for admins to disable ICAP pooling where needed. Most ICAP
environments will probably want to disable bandwidth controls because
ICAP service traffic is usually "local".

Removed StoreEntry::bytesWanted() TRY_FWD_HDR_WAIT guard that disabled
delay pool application until the final HTTP response headers are
received (HttpStateData::haveParsedReplyHeaders() is called). Nobody
could fully explain why that condition was really needed (and we
obviously want to limit bandwidth consumption at all response processing
stages, in general). The now-removed guard was bypassing delay pool
checks for virgin HTTP response (until the ICAP server responded with
adapted headers), causing bandwidth overuse.

Possibly fixes or helps with Squid bug #2606 as well.

13 years agoBug 2976: squid reports ERR_INVALID_URL for transparently captured requests when...
Christos Tsantilas [Thu, 21 Jun 2012 00:35:06 +0000 (18:35 -0600)] 
Bug 2976: squid reports ERR_INVALID_URL for transparently captured requests when reconfiguring

During reconfigure the configured AnyP::PortCfg objects in http_port_list
may deleted so it is not safe to use them while processing Http requests.
For this reason inside prepareTransparentURL (file client_side.cc) function
the protocol was hard-coded to "http" instead of read it from the related
AnyP::PortCfg object.
But this is breaks the intercepted https traffic.

This patch:
  1. Inside prepareTransparentURL read the protocol from the related
     AnyP::PortCfg object
  2. add_http_port() locks the new port pointer before linking it.
  3. parsePortCfg() locks the new port pointer before linking it.
  4. free_PortCfg() unlock the old port pointer before unlinking
     it. It does not delete the old pointer.

This patch also discussed in squid-dev user mailing list in
 "Re: [PATCH] Squid host rewrite for intercepted https requests"
thread.

This is a Measurement Factory project

13 years agoFix testHttpParser compile error 'variable tracking size limit exceeded'
Amos Jeffries [Tue, 19 Jun 2012 05:18:04 +0000 (23:18 -0600)] 
Fix testHttpParser compile error 'variable tracking size limit exceeded'

This can occur due to long lists of unit tests needing a lot of local
variable state tracking. Essentially 'function too long' after CPPUNIT
macros have been expanded.

Break the large set of request-line unit tests into groups related to
sub-parts of the request-line.

13 years agoPerformance: ACLFilledChecklist fills istelf from HttpRequest
Amos Jeffries [Tue, 19 Jun 2012 05:17:22 +0000 (23:17 -0600)] 
Performance: ACLFilledChecklist fills istelf from HttpRequest

13 years agoBug 3564: eCAP not supporting CoAP URI schemes
Amos Jeffries [Tue, 19 Jun 2012 05:15:36 +0000 (23:15 -0600)] 
Bug 3564: eCAP not supporting CoAP URI schemes

13 years agoFixed typo in r12165 (Bug 2138: NTLM passthrough using accel peer and ssl)
Alex Rousskov [Tue, 19 Jun 2012 02:28:12 +0000 (20:28 -0600)] 
Fixed typo in r12165 (Bug 2138: NTLM passthrough using accel peer and ssl)

13 years agossl_crtd compile issues with libsslutil
Alexander Komyagin [Tue, 19 Jun 2012 02:26:16 +0000 (20:26 -0600)] 
ssl_crtd compile issues with libsslutil

13 years agoBug 3526: permit high-speed nonce regeneration
Frederic Bourgeois [Tue, 19 Jun 2012 02:24:57 +0000 (20:24 -0600)] 
Bug 3526: permit high-speed nonce regeneration

13 years agoBug 2138: NTLM passthrough using accel cache_peer and ssl
Juan [Tue, 19 Jun 2012 02:23:37 +0000 (20:23 -0600)] 
Bug 2138: NTLM passthrough using accel cache_peer and ssl

13 years agoDrop dead include from xusleep.c
Amos Jeffries [Tue, 19 Jun 2012 01:45:51 +0000 (19:45 -0600)] 
Drop dead include from xusleep.c

13 years agoCleanup: remove xcountws() function
Amos Jeffries [Tue, 19 Jun 2012 01:41:22 +0000 (19:41 -0600)] 
Cleanup: remove xcountws() function

Reduces dependencies and removes one more unnecessary symbol

13 years agoRFC 6585 extends HTTP
Amos Jeffries [Tue, 19 Jun 2012 01:39:44 +0000 (19:39 -0600)] 
RFC 6585 extends HTTP

13 years agoBug 3405: ssl_crtd crashes failing to remove certificate
Alex Rousskov [Sat, 16 Jun 2012 02:19:41 +0000 (20:19 -0600)] 
Bug 3405: ssl_crtd crashes failing to remove certificate

13 years agoBug 3561: cbdata cookie assertion after bug 3505 fix.
Alex Rousskov [Wed, 13 Jun 2012 04:41:19 +0000 (22:41 -0600)] 
Bug 3561: cbdata cookie assertion after bug 3505 fix.

13 years agoPrep for 3.1.20
Amos Jeffries [Fri, 8 Jun 2012 11:01:05 +0000 (05:01 -0600)] 
Prep for 3.1.20

13 years agoRevert auto-maintenance mistake revno11566
Amos Jeffries [Fri, 8 Jun 2012 10:01:28 +0000 (04:01 -0600)] 
Revert auto-maintenance mistake revno11566

13 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 5 Jun 2012 11:27:52 +0000 (05:27 -0600)] 
SourceFormat Enforcement

13 years agoSourceLayout: convert hash.c to hash.cc
Amos Jeffries [Mon, 4 Jun 2012 11:13:50 +0000 (05:13 -0600)] 
SourceLayout: convert hash.c to hash.cc

Fix compiler identified C'isms. No other changes.

13 years agoBug 3013: segmentation fault on shutdown commSetCloseOnExec at comm.cc:1889
Christos Tsantilas [Mon, 4 Jun 2012 11:10:49 +0000 (05:10 -0600)] 
Bug 3013: segmentation fault on shutdown commSetCloseOnExec at comm.cc:1889

13 years agoBug 3233: Invalid URL accepted with url host is white spaces
Amos Jeffries [Mon, 4 Jun 2012 11:06:45 +0000 (05:06 -0600)] 
Bug 3233: Invalid URL accepted with url host is white spaces

13 years agoBug 3074: Improper URL handling with empty path (RFC 3986)
Fyodor [Mon, 4 Jun 2012 11:04:55 +0000 (05:04 -0600)] 
Bug 3074: Improper URL handling with empty path (RFC 3986)

13 years agoBug 3463: dnsserver fails to compile
Christos Tsantilas [Mon, 4 Jun 2012 11:03:27 +0000 (05:03 -0600)] 
Bug 3463: dnsserver fails to compile

13 years agoBug 3390: Proxy auth data visible to scripts
Francesco Chemolli [Mon, 4 Jun 2012 11:01:11 +0000 (05:01 -0600)] 
Bug 3390: Proxy auth data visible to scripts

13 years agoBug 3537: polish StatHist copy to avoid memory errors
Timo Teras [Mon, 4 Jun 2012 10:56:52 +0000 (04:56 -0600)] 
Bug 3537: polish StatHist copy to avoid memory errors

13 years agoPass external_acl_type credentials to ICAP
Dan Searle [Mon, 4 Jun 2012 10:54:52 +0000 (04:54 -0600)] 
Pass external_acl_type credentials to ICAP

Pass user credentials obtained from external ACLs to the ICAP service
using Proxy-Authorization and X-Client-Username ICAP headers.

13 years agoBug #3380: Mac OSX compile errors with CMSG_SPACE
Dmitry Kurochkin [Mon, 4 Jun 2012 10:52:56 +0000 (04:52 -0600)] 
Bug #3380: Mac OSX compile errors with CMSG_SPACE

13 years agoExtend g++ compatibility for extern inline functions
Francesco Chemolli [Mon, 4 Jun 2012 10:51:31 +0000 (04:51 -0600)] 
Extend g++ compatibility for extern inline functions

13 years agoDefine PRIuSIZE for displaying size_t
Amos Jeffries [Mon, 4 Jun 2012 10:50:34 +0000 (04:50 -0600)] 
Define PRIuSIZE for displaying size_t

This allows us to avoid casting size_t to long long for printf.

./configure script auto-detects the supposedly standard %zu macro in case
it is missing and compat/types.h defines some alternatives for systems
which do not define it.

13 years agoWindows: Disable WCCP, WCCPv2, DiskDaemon by default on MinGW
Francesco Chemolli [Mon, 4 Jun 2012 10:49:47 +0000 (04:49 -0600)] 
Windows: Disable WCCP, WCCPv2, DiskDaemon by default on MinGW