]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
14 years agoAdd Subscription interface
Amos Jeffries [Sat, 11 Sep 2010 03:31:47 +0000 (15:31 +1200)] 
Add Subscription interface

14 years agoAPI for AcceptLimiter to allow pruning pending events.
Amos Jeffries [Tue, 7 Sep 2010 10:35:13 +0000 (22:35 +1200)] 
API for AcceptLimiter to allow pruning pending events.

14 years agoMerge from trunk
Amos Jeffries [Sat, 4 Sep 2010 15:09:33 +0000 (03:09 +1200)] 
Merge from trunk

14 years agoMake conn a shared field for CommCalls
Amos Jeffries [Sat, 4 Sep 2010 15:03:12 +0000 (03:03 +1200)] 
Make conn a shared field for CommCalls

Create a commSetConnTimeout() function to hide FD field from code
needing to set timeouts.

Also, some extra build fixes after FwdStart and server Start() changes.

14 years agoEnsure /var/cache or jail equivalent exists on install
Amos Jeffries [Sat, 4 Sep 2010 12:52:43 +0000 (00:52 +1200)] 
Ensure /var/cache or jail equivalent exists on install

14 years agoPrep for 3.2.0.2 and 3.1.8
Amos Jeffries [Fri, 3 Sep 2010 13:30:11 +0000 (01:30 +1200)] 
Prep for 3.2.0.2 and 3.1.8

14 years agoTypo in profiler for new HTTP parser
Amos Jeffries [Fri, 3 Sep 2010 02:04:59 +0000 (14:04 +1200)] 
Typo in profiler for new HTTP parser

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 3 Sep 2010 00:12:44 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoDocumented OPTIONS and TRACE handing in urlCheckRequest().
Alex Rousskov [Thu, 2 Sep 2010 20:46:42 +0000 (14:46 -0600)] 
Documented OPTIONS and TRACE handing in urlCheckRequest().

14 years agoNot all CPPUNIT can convert long/int to long/long for test
Amos Jeffries [Thu, 2 Sep 2010 12:23:42 +0000 (06:23 -0600)] 
Not all CPPUNIT can convert long/int to long/long for test

14 years agoUnit-tests for the new HTTP request-line parser
Amos Jeffries [Thu, 2 Sep 2010 03:09:42 +0000 (21:09 -0600)] 
Unit-tests for the new HTTP request-line parser

14 years agoHarden and speed up HTTP request-line parser
Amos Jeffries [Thu, 2 Sep 2010 03:02:53 +0000 (21:02 -0600)] 
Harden and speed up HTTP request-line parser

An upgrade/fix to handling HTTP request-lines as specific by
section 5.1 of the RFCs. Specifically to handle a sequence of
unknown bytes up to a terminating LF (\n) octet.

* The semantics as previously documented are taken on. No changes
 there, but documentation clarified a bit. Some things previously not
 erroring are now doing so. External code impact is in the nature of
 reduced special cases to be handled. Specifically raw-CR weirdness in
 the request line fields. This occuring in URL was a vulnerability at
 least once before.

* Prior updates to HttpParser object for other parse stages opens the
 possibility of this parse action returning HTTP status code directly.
 Additions are done to make use of this (with the existing status codes
 only).

* Input permutations where the unit-tests showed the old parser was
 violating its own documentation have been fixed to produce expected
 outputs.

* Old parser operated three distinct potentially long parse loops.
 Added several local variables to remember various octets seen while
 searching for the terminal LF. This removed the need for two of the
 parse re-scans (length of method, length of URI).

* relaxed_header_parser will enable it to also skip prefix whitespace
 (space character only) and multiple-\r sequences at the end of line.

* --enable-http-violations is still required before it will accept
 non-HTTP version types 'downgraded' to HTTP/0.9

14 years agoCheck for NULL and empty strings before calling str*cmp().
Alex Rousskov [Wed, 1 Sep 2010 03:44:05 +0000 (21:44 -0600)] 
Check for NULL and empty strings before calling str*cmp().

These checks are necessary to ensure consistent comparison results (important
for sorting and searching) and to avoid segfaults on NULL buffers (because
termedBuf() may return NULL instead of the expected "0-terminated buffer").

14 years agoAdded Stefan Fritsch for help with Squid bug #2583.
Alex Rousskov [Wed, 1 Sep 2010 00:17:47 +0000 (18:17 -0600)] 
Added Stefan Fritsch for help with Squid bug #2583.

14 years agoPossible bug 3020 fix: Segmentation fault: nameservers[vc->ns].vc = NULL
Alex Rousskov [Wed, 1 Sep 2010 00:08:35 +0000 (18:08 -0600)] 
Possible bug 3020 fix: Segmentation fault: nameservers[vc->ns].vc = NULL

Prevent idnsVCClosed segfaults during shutdown or reconfiguration (at least).

idnsShutdown() schedules comm_close and then frees nameservers[] by
calling idnsFreeNameservers. The closing handler tried to access freed
nameservers[]. The patch prevents access to the freed nameservers[]
array in idnsVCClosed and other functions.

TODO: Nameservers[] array management should be rewritten. The array
should not be freed while there are nameservers using it. It should be
freed when the last entry is gone.

From: 3p1-rock r9583

14 years agoImprove request smuggling attack detection. Tolerate valid benign HTTP
Alex Rousskov [Wed, 1 Sep 2010 00:00:41 +0000 (18:00 -0600)] 
Improve request smuggling attack detection. Tolerate valid benign HTTP
headers.

Removed "double CR" check from parseHttpRequest() for several reasons:

1) The check was most likely introduced as a short-term defense
   against "HTTP request smuggling" attacks identified in an
   influential 2004 paper. The paper documented certain
   vulnerabilities related to requests with "double CR" sequences, and
   Squid was quickly hacked to prohibit such requests as
   malformed. However, a more careful reading of the paper indicates
   that only LF CR CR LF (a.k.a. "CR header") sequences were
   identified as dangerous (note the leading LF). The quick fix was
   too aggressive and blocked _all_ requests with CR CR LF sequences,
   including benign requests.

2) The check duplicated a HttpHeader::parse() check.

3) The check was slower than the code it duplicated.

Improved "double CR" handling in HttpHeader::parse() to detect
potentially dangerous "empty headers", that is header fields that
contain nothing but CR character(s). Requests with such headers are
rejected as malformed. We used to reject similar requests (and more)
in parseHttpRequest() as described above.

After the change, potentially malicious requests with CR+ headers are
still denied. Other, benign headers ending with CRs are now allowed.

If the HTTP header parser is not "relaxed", benign and valid requests
with extra CR characters are blocked as before.

14 years agoCompliance: Ignore unused chunk-extensions to correctly handle large ones.
Alex Rousskov [Tue, 31 Aug 2010 23:50:57 +0000 (17:50 -0600)] 
Compliance: Ignore unused chunk-extensions to correctly handle large ones.

Chunk parser did not advance until it got a complete chunk-extension.
HttpStateData::maybeReadVirginBody() does not grow the buffer if there is no
space available for the [chunked] body so the transaction with a large
chunk-extension would stall. The default HttpStateData input buffer size is
just 2KB so it does not take a "very large" extension to stall the
transaction.

Somewhat ironically, we are not even interested in the HTTP chunk-extension
itself. After the change, Squid skips the chunk-extension data as soon as it
gets it (except for the last-chunk, see below). Incrementally ignoring data
requires handling quoted strings correctly, to avoid mis-detecting a quoted
CRLF. Thus, we now preserve the quoted string parsing state in
ChunkedCodingParser.

Last-chunk chunk-extension is useful for ICAP. We parse it instead of
ignoring. This parsing is done as before and may still lead to connection
hanging, but a proper fix is outside this patch scope. Similarly, other
stalling reasons are outside this patch scope.

Co-Advisor test case:
    test_case/rfc2616/chunked-1p0-longValExt-16385-toClt

14 years agoCompliance: handle HTTP OPTIONS and TRACE requests with asterisk URIs.
Alex Rousskov [Tue, 31 Aug 2010 23:46:24 +0000 (17:46 -0600)] 
Compliance: handle HTTP OPTIONS and TRACE requests with asterisk URIs.

Handle '*' URIs in urlParse(). This allows Squid properly respond to
OPTIONS and TRACE requests with '*' URIs and Max-Forwards value of
zero. Forwarding such requests is out of this change scope and still
does not work because the upstream host and port are not set.

Co-Advisor test cases:
  test_case/rfc2616/options-bodyless-asterisk
  test_case/rfc2616/maxForwardsZero-OPTIONS-asterisk
  test_case/rfc2616/maxForwardsZero-TRACE-asterisk

14 years agoDefine SIZEOF_OFF_T to fix overflow checks.
Alex Rousskov [Tue, 31 Aug 2010 23:41:30 +0000 (17:41 -0600)] 
Define SIZEOF_OFF_T to fix overflow checks.

Overflow checks were broken because 'SIZEOF_OFF_T <= 4' was always true
because SIZEOF_OFF_T was not defined and, hence, treated as zero.

Co-Advisor test cases:

test_case/rfc2616/noXform-fwd-Content-Range-simple-2147483645-2147483646-2147483647-withCc-toClt
test_case/rfc2616/noXform-fwd-Content-Range-simple-2147483645-2147483646-*-withCc-toClt

14 years agoMade the HttpMsgPointerT::lock() and unlock() methods protected
Alex Rousskov [Tue, 31 Aug 2010 23:37:04 +0000 (17:37 -0600)] 
Made the HttpMsgPointerT::lock() and unlock() methods protected

It would be difficult for the caller to use them correctly, and it is probably
not necessary for the caller to use them at all.

14 years agoCompliance: reply with 400 (Bad Request) if request header is too big.
Alex Rousskov [Tue, 31 Aug 2010 23:34:10 +0000 (17:34 -0600)] 
Compliance: reply with 400 (Bad Request) if request header is too big.

Reply with a standard 400 (Bad Request) instead of 601 (Unknown) status in
case of an ERR_TOO_BIG error. HTTP does not have a dedicated code for the
too-big header error. There is 414 (Request-URI Too Long), but Squid does not
distinguish too-large headers from too-large URIs.

Co-Advisor test case: test_case/rfc2616/longUri-65536

14 years agoBug 3033: incorrect information regarding TOS
Amos Jeffries [Tue, 31 Aug 2010 13:19:37 +0000 (01:19 +1200)] 
Bug 3033: incorrect information regarding TOS

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 31 Aug 2010 00:17:20 +0000 (18:17 -0600)] 
SourceFormat Enforcement

14 years agoBootstrapped
Automatic source maintenance [Tue, 31 Aug 2010 00:14:13 +0000 (18:14 -0600)] 
Bootstrapped

14 years agoAdded safe HttpMsg pointer wrapper that locks and unlocks the message.
Alex Rousskov [Mon, 30 Aug 2010 22:55:02 +0000 (16:55 -0600)] 
Added safe HttpMsg pointer wrapper that locks and unlocks the message.

This class will not be needed if we switch to refcounting HttpMsg. Meanwhile,
it allows to pass message pointers in AsyncCalls and avoid auto_ptr<> in
exception-sensitive code.

14 years agoRemove LTDL hack from bootstrap.
Amos Jeffries [Mon, 30 Aug 2010 03:41:04 +0000 (21:41 -0600)] 
Remove LTDL hack from bootstrap.

Now confirmed and tested the correct use of -I paths to enable Squid
to build on systems with older libtool versions. The hack forcing local
headers to be used is no longer required.

14 years agoLibtool 1.x no longer work. autoconf 2.64 does
Amos Jeffries [Mon, 30 Aug 2010 01:34:43 +0000 (19:34 -0600)] 
Libtool 1.x no longer work. autoconf 2.64 does

14 years agoAuthor: Chad Naugle <chad.naugle@travimp.com>
Amos Jeffries [Mon, 30 Aug 2010 00:05:19 +0000 (12:05 +1200)] 
Author: Chad Naugle <chad.naugle@travimp.com>
Correct GPLv2+ clauses on ext_edirectory_userip_acl helper

Reference: http://bugs.squid-cache.org/show_bug.cgi?id=2905

comment #6: 2010-04-20 07:53:34 MDT

(In reply to comment #5)
> Unfortunately GPLv2+ and GPLv3 do not mix entirely well, unless we consider
> bundling the helper mere aggregation and not integrated.
>
> also, why can't you use the LDAP for matching the attribute instead of having
> to retreive all possible users and then compare the networkAddress "manually"?

I'll swap out the GPLv3 into GPLv2, no biggie.  All I've done was add the files
and clauses so far.  I'm just searching to see if there is something I am
missing for that.

comment #10: 2010-04-20 14:51:14 MDT

Created attachment 2139 [details]
v1.2 GPLv2+ version

14 years agoMade eCAP compile again after CbcPointer<> changes.
Alex Rousskov [Sun, 29 Aug 2010 21:50:09 +0000 (15:50 -0600)] 
Made eCAP compile again after CbcPointer<> changes.

Old eCAP code tried to call stillProducing(this) and stillConsuming(this)
methods from a const status() method. Doing so produces compiler errors
because stillProducing() and stillConsuming() do not accept pointers to
constant jobs.

CBDATA_CLASSes and, hence, CbcPointer<>, do not support const-correctness
well: In order to create/destroy a cbdata-based smart pointer, one has to
lock/unlock cbdata, which requires modifying the object. Thus, the smart
pointer cannot point to a truly constant object. The core of the problem is
that CBDATA_CLASSes keep cbdata and object data together. When all raw/dumb
CBDATA_CLASS pointers are gone, we can separate the two "datas" and solve the
const-correctness problem for good. The "separate-datas" design would even be
consistent with the original cbdata design which we often violate, IMO.

There are other workarounds. We could declare toCbdata() constant, for
example. However, that would essentially disable checks where a
cbdata-protected object is being destroyed despite the caller's intent to keep
the object constant. This change is not as general but is also much less
intrusive.

14 years agoHandle assignment to self correctly.
Alex Rousskov [Sun, 29 Aug 2010 21:16:57 +0000 (15:16 -0600)] 
Handle assignment to self correctly.

Self-assignment probably does not happen in the current code.

14 years agoFix cross-compile support in ./configure
Amos Jeffries [Sun, 29 Aug 2010 14:07:18 +0000 (08:07 -0600)] 
Fix cross-compile support in ./configure

14 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
Amos Jeffries [Sun, 29 Aug 2010 01:24:31 +0000 (13:24 +1200)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Simplify GSSAPI header includes for squidclient

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 29 Aug 2010 00:12:52 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoMake CNCB use const conn
Amos Jeffries [Sat, 28 Aug 2010 13:39:09 +0000 (01:39 +1200)] 
Make CNCB use const conn

14 years agoAuthor: Stefan Fritsch <sf@sfritsch.de>
Amos Jeffries [Sat, 28 Aug 2010 07:31:03 +0000 (19:31 +1200)] 
Author: Stefan Fritsch <sf@sfritsch.de>
Bug 2872: leaking file descriptors

As I understand it, the leak happens this way: A client request kicks off an
asynchronous file open request. If the client request is aborted and disappears
before the file open has completed, the file is never closed again. This
explains why this leak can only happen with aufs and not with ufs.

14 years agoStraighten the tunnel pump read/write handlers
Amos Jeffries [Sat, 28 Aug 2010 07:12:52 +0000 (19:12 +1200)] 
Straighten the tunnel pump read/write handlers

At the point of calling FD may already be closed and draining of buffers
underway. They also have internal consistency checks to cleanup the pump
state if one or other conn is close early.

remove invalid asserts and do debug outputs with safe non-dereference
display of Comm::ConnectionPointer contents.

14 years agoremove invalid assert in tunnel read
Amos Jeffries [Sat, 28 Aug 2010 06:17:56 +0000 (18:17 +1200)] 
remove invalid assert in tunnel read

14 years agoBump the src-end read timeout on tunnel reads, not just the server
Amos Jeffries [Sat, 28 Aug 2010 04:51:53 +0000 (16:51 +1200)] 
Bump the src-end read timeout on tunnel reads, not just the server

14 years agoMove &>bs logformat code release notes to 3.2
Amos Jeffries [Fri, 27 Aug 2010 16:12:21 +0000 (10:12 -0600)] 
Move &>bs logformat code release notes to 3.2

14 years agomore build errors after trunk merge
Amos Jeffries [Fri, 27 Aug 2010 15:37:31 +0000 (03:37 +1200)] 
more build errors after trunk merge

14 years agoBasic build errors after trunk merge
Amos Jeffries [Fri, 27 Aug 2010 13:23:46 +0000 (01:23 +1200)] 
Basic build errors after trunk merge

14 years agoMerged from trunk
Amos Jeffries [Fri, 27 Aug 2010 09:33:34 +0000 (21:33 +1200)] 
Merged from trunk

14 years agoRoll Comm::Connection into client-facing
Amos Jeffries [Fri, 27 Aug 2010 09:08:48 +0000 (21:08 +1200)] 
Roll Comm::Connection into client-facing

14 years agoMake the LTDL loadable modules paths global
Amos Jeffries [Thu, 26 Aug 2010 01:12:07 +0000 (19:12 -0600)] 
Make the LTDL loadable modules paths global

Still wrapped for as-needed. May be needed by many places by src/ code

14 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
Amos Jeffries [Wed, 25 Aug 2010 03:10:45 +0000 (21:10 -0600)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Support Kerberos authentication in squidclient

14 years agoStrip testing debug slipped in
Amos Jeffries [Wed, 25 Aug 2010 03:08:37 +0000 (21:08 -0600)] 
Strip testing debug slipped in

14 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 25 Aug 2010 00:14:25 +0000 (18:14 -0600)] 
SourceFormat Enforcement

14 years agoPossible fix for an OpenSolaris "pureparm" compilation error.
Alex Rousskov [Tue, 24 Aug 2010 22:05:52 +0000 (16:05 -0600)] 
Possible fix for an OpenSolaris "pureparm" compilation error.

Our CallJobHere1() macro tried to help the compiler to determine the right
JobMemFun() profile by explicitly specifying the first JobMemFun() template
argument type. There is a second template argument in the CallJobHere1 case,
but we cannot specify it explicitly. Apparently, OpenSolaris compiler got
confused, perhaps justifiably so, by only one template argument specified.

This change removes the explicit first template parameter from the JobMemFun()
call inside the CallJobHere1(). It does not seem to be required for GCC on
RHEL5.  Tests will show what other compilers think.

14 years agoStrengthen the internal DNS client somewhat by making sure to keep
Henrik Nordstrom [Tue, 24 Aug 2010 21:04:22 +0000 (23:04 +0200)] 
Strengthen the internal DNS client somewhat by making sure to keep
the receive queue drained. Also avoid parsing messages unless we
have a pending query.

14 years agoFixed old HTTP version comparison to treat {2,3,4...}.0 versions correctly.
Alex Rousskov [Tue, 24 Aug 2010 20:35:02 +0000 (14:35 -0600)] 
Fixed old HTTP version comparison to treat {2,3,4...}.0 versions correctly.

Uses the recently added HttpVersion comparison operators. No real-world
effect expected until we start seeing HTTP/2.0 messages.

14 years agoRemember local port of the CONNECT tunnel to the server, for %<lp logging.
Alex Rousskov [Tue, 24 Aug 2010 20:19:30 +0000 (14:19 -0600)] 
Remember local port of the CONNECT tunnel to the server, for %<lp logging.

14 years agoAuthor: Henrik Nordstrom <henrik@nordstrom.net>
Amos Jeffries [Tue, 24 Aug 2010 11:31:44 +0000 (23:31 +1200)] 
Author: Henrik Nordstrom <henrik@nordstrom.net>
Author: Amos Jeffries <squid3@treenet.co.nz>
Collapse HTCP cache_peer options into one setting.

The list of HTCP mode options had grown a bit too large. Collapse them
all into a single htcp= option taking a list of mode flags.

14 years agoSolaris compatiblity enhancements.
Francesco Chemolli [Tue, 24 Aug 2010 10:35:03 +0000 (12:35 +0200)] 
Solaris compatiblity enhancements.

14 years agoTest for SASL libraries before building ext_kerberos_ldap_group_acl
Amos Jeffries [Tue, 24 Aug 2010 09:20:49 +0000 (03:20 -0600)] 
Test for SASL libraries before building ext_kerberos_ldap_group_acl

14 years agoCompliance: remove Content-Length header if Transfer-Encoding is present.
Alex Rousskov [Tue, 24 Aug 2010 04:18:51 +0000 (22:18 -0600)] 
Compliance: remove Content-Length header if Transfer-Encoding is present.

If after HTTP header parsing we have both "Transfer-Encoding: chunked"
and Content-Length headers, remove the Content-Length entry. The
adjusted behavior follows httpbis recommendations (ticket #95, part 2).

The old client-side code forwarded the original Content-Length header
which did not match the [dechunked] response, resulting in a malformed
response.

HttpHeader::chunked() method added to check if HTTP headers contain
chunked Transfer-Encoding header. Use this method in code that checks
for chunked encoding.

Co-Advisor test cases: test_case/rfc2616/chunked-1p0-badClen-toClt
                       test_case/rfc2616/chunked-1p1-badClen-toClt

14 years agoCompliance: respond to OPTIONS requests with a zero Max-Forwards value.
Alex Rousskov [Tue, 24 Aug 2010 04:07:00 +0000 (22:07 -0600)] 
Compliance: respond to OPTIONS requests with a zero Max-Forwards value.

RFC 2616 section 9.2 says that a proxy MUST NOT forward requests with a
zero Max-Forwards value. RFC 2616 does not define any proper OPTIONS
responses, so we consider successful responses optional and reply with
501 Not Implemented.

No change in handling OPTIONS requests with positive Max-Forwards values.

While TRACE and OPTIONS are similar with regard to Max-Forwards, we
handle them in different places because OPTIONS responses do not need to
echo the request via Store.

Co-Advisor test case: test_case/rfc2616/maxForwardsZero-OPTIONS-absolute

14 years agoCompliance: rename Trailers header to Trailer everywhere.
Alex Rousskov [Tue, 24 Aug 2010 04:03:19 +0000 (22:03 -0600)] 
Compliance: rename Trailers header to Trailer everywhere.

RFC 2616 section 13.5.1 has a typo in the Trailers header name. The correct
name is Trailer. See http://trac.tools.ietf.org/wg/httpbis/trac/ticket/9

Co-Advisor test cases: test_case/rfc2616/hopHdr-Trailer-toClt
                       test_case/rfc2616/hopHdr-Trailer-toSrv

14 years agoAdded parentheses for clarity.
Alex Rousskov [Tue, 24 Aug 2010 03:56:20 +0000 (21:56 -0600)] 
Added parentheses for clarity.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 24 Aug 2010 00:12:54 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoSend chunked responses if body size is unknown.
Alex Rousskov [Tue, 24 Aug 2010 00:02:15 +0000 (18:02 -0600)] 
Send chunked responses if body size is unknown.

Apply HTTP chunked transfer encoding to the response body sent to client
if all of the following conditions are met:

* client claims HTTP version 1.1 or later support
* response does not have a Content-Length header already
* response does not use multipart/byteranges encoding
* connection is persistent

If we decide to send chunked reply, chunked_reply flag is set. Chunked
encoding is done in ClientSocketContext::packChunk(). The last-chunk
is sent only when clientReplyContext complete flag is set.

This change helps keep client-side connections persistent.

14 years agoAdded more comparison operators to HttpVersion.
Alex Rousskov [Mon, 23 Aug 2010 23:25:09 +0000 (17:25 -0600)] 
Added more comparison operators to HttpVersion.

14 years agoBug #2583 fix: pure virtual method called
Alex Rousskov [Mon, 23 Aug 2010 23:15:26 +0000 (17:15 -0600)] 
Bug #2583 fix: pure virtual method called

When a cbdata-protected class holds its own cbdata and has virtual
toCbdata(), there is a catch22 problem: we need cbdata to know whether
the pointer to the class object is valid, and we need to dereference
that pointer to get cbdata.

Added CbcPointer class to hold both a pointer to a potentially freed
class object and the cbdata pointer protecting that object. Keeping the
cbdata pointer allows us to test whether the object is still there
without dereferencing the object pointer.

Use the CbcPointer class to hold safe pointers to AsyncJobs. This
prevents "pure virtual method called" failures because we no longer
dereference freed job pointers.

Removed Initiator parameter from many initiatee constructors. The
Adaptation::Initiator::initiateAdaptation method now sets the initiator
of the job. This makes the constructor profile simpler and removes the
need to propagate Initiator changes through all the [nested]
constructors.

Renamed AsyncJob::AsyncStart() to AsyncJob::Start(). I had to change the
callers code anyway and it was a good opportunity to remove the
redundant "Async".

Special thanks to Stefan Fritsch for updating and testing an earlier
version of this patch.

14 years agoCompatibility fixes for Solaris/gcc
Francesco Chemolli [Mon, 23 Aug 2010 13:15:48 +0000 (15:15 +0200)] 
Compatibility fixes for Solaris/gcc

14 years agoSync dist languages with .po
Amos Jeffries [Mon, 23 Aug 2010 02:21:19 +0000 (20:21 -0600)] 
Sync dist languages with .po

14 years agomore prep for 3.1.7
Amos Jeffries [Mon, 23 Aug 2010 01:15:39 +0000 (19:15 -0600)] 
more prep for 3.1.7

14 years agoAuthor: Stephen Thorne <stephen@thorne.id.au>
Amos Jeffries [Mon, 23 Aug 2010 01:11:56 +0000 (19:11 -0600)] 
Author: Stephen Thorne <stephen@thorne.id.au>
Bug 3021: Large DNS reply causes crash when no ipv6 resolver present

14 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 23 Aug 2010 00:12:46 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoPortability fix. Sometimes /bin/true is not, apparently, in /bin
Francesco Chemolli [Sun, 22 Aug 2010 10:44:01 +0000 (12:44 +0200)] 
Portability fix. Sometimes /bin/true is not, apparently, in /bin

14 years agoFix build issue on FreeBSD: printf arguments have to be cast.
Francesco Chemolli [Sun, 22 Aug 2010 10:29:23 +0000 (12:29 +0200)] 
Fix build issue on FreeBSD: printf arguments have to be cast.

14 years agoAuthor: Various Translators
Amos Jeffries [Sat, 21 Aug 2010 18:00:48 +0000 (06:00 +1200)] 
Author: Various Translators
Translations Update auto-save

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 21 Aug 2010 00:12:42 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoCompilation speedup: optimize test-suite/testheaders.sh
Francesco Chemolli [Fri, 20 Aug 2010 16:15:46 +0000 (18:15 +0200)] 
Compilation speedup: optimize test-suite/testheaders.sh

14 years agoFixed build issue in purge tool.
Francesco Chemolli [Fri, 20 Aug 2010 12:55:51 +0000 (14:55 +0200)] 
Fixed build issue in purge tool.

14 years agoFixed some build errors in purge tool.
Francesco Chemolli [Fri, 20 Aug 2010 11:29:35 +0000 (13:29 +0200)] 
Fixed some build errors in purge tool.

14 years agoKill redundant hexd program from purge.
Henrik Nordstrom [Fri, 20 Aug 2010 02:38:28 +0000 (04:38 +0200)] 
Kill redundant hexd program from purge.

There is too many other tools for producing a readable hexdump of a file.

14 years agoAlso fix up hexd to Squid coding standards
Henrik Nordstrom [Fri, 20 Aug 2010 02:27:43 +0000 (04:27 +0200)] 
Also fix up hexd to Squid coding standards

14 years agoAdjust purge sources to Squid coding standard (xmalloc, xfree etc)
Henrik Nordstrom [Fri, 20 Aug 2010 02:22:16 +0000 (04:22 +0200)] 
Adjust purge sources to Squid coding standard (xmalloc, xfree etc)

14 years agoClean up DEFAULT_PID_FILE in similar manner
Henrik Nordstrom [Fri, 20 Aug 2010 02:06:26 +0000 (04:06 +0200)] 
Clean up DEFAULT_PID_FILE in similar manner

14 years agoKill recursive DEFAULT_HOSTS. Automake automatically adds expansions to Makefile...
Henrik Nordstrom [Fri, 20 Aug 2010 02:05:46 +0000 (04:05 +0200)] 
Kill recursive DEFAULT_HOSTS. Automake automatically adds expansions to Makefile.in, no need for us to wrongly try to reference them..

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 20 Aug 2010 00:12:50 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoconfigure.in fix: properly pass default hosts_file option around during build.
Francesco Chemolli [Thu, 19 Aug 2010 12:50:13 +0000 (14:50 +0200)] 
configure.in fix: properly pass default hosts_file option around during build.

14 years agoBundle the purge and hexd tools with Squid sources.
Amos Jeffries [Thu, 19 Aug 2010 03:33:12 +0000 (21:33 -0600)] 
Bundle the purge and hexd tools with Squid sources.

Fixes the remaining known errors with purge tool building within
Squid source tree.

This adds the auto-tools changes necessary to bundle the tool.

14 years agorevert unwanted changes slipped into rev10756.
Amos Jeffries [Thu, 19 Aug 2010 03:14:16 +0000 (21:14 -0600)] 
revert unwanted changes slipped into rev10756.

14 years agoPrep for 3.1.7
Amos Jeffries [Thu, 19 Aug 2010 03:07:55 +0000 (15:07 +1200)] 
Prep for 3.1.7

14 years agoRemove diff-reducer hack in rev10754
Amos Jeffries [Thu, 19 Aug 2010 02:24:47 +0000 (20:24 -0600)] 
Remove diff-reducer hack in rev10754

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 19 Aug 2010 00:12:43 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoAuthor: Alex Rousskov <rousskov@measurement-factory.com>
Amos Jeffries [Wed, 18 Aug 2010 23:43:22 +0000 (17:43 -0600)] 
Author: Alex Rousskov <rousskov@measurement-factory.com>
Bug 3016: HTTP/1.1 compliance: default keep-alive for 1.0/1.1 clients.

aka. NTLM Authentication with Java UA + SSL Problem
Moved httpMsgIsPersistent(version, headers) to HttpMsg::persistent(void).

This move makes it clear that the logic applies only to the message being
examined and not some irrelevant information such as HTTP version supported
by Squid.

Side-effects:

 - In v3.2, Squid stops using persistent connections with HTTP/1.0 clients
   that do not send "Connection: keep-alive".

 - In v3.1, Squid starts using persistent connections with HTTP/1.1 clients
   that do not send "Connection: close".

 - HttpReply now sets HttpMsg::http_ver member. It is not clear whether
   that member was ever used for HttpReplies though.

14 years agoAuthor: Various Translators
Amos Jeffries [Wed, 18 Aug 2010 00:00:54 +0000 (12:00 +1200)] 
Author: Various Translators
Translations Update auto-save

14 years agoAuthor: Various Translators
Amos Jeffries [Tue, 17 Aug 2010 18:01:41 +0000 (06:01 +1200)] 
Author: Various Translators
Translations Update auto-save

14 years agoPotential bug #3015 fix: assertion failed: comm.cc:143: "ccb->active()"
Alex Rousskov [Tue, 17 Aug 2010 16:24:18 +0000 (10:24 -0600)] 
Potential bug #3015 fix: assertion failed: comm.cc:143: "ccb->active()"

Fixed "ccb->active()" assertion related to the automatic write timeout.

We need to manually cancel writer's interest in select(2) before calling back
so that select() does not try to call the write handler when there is no
active callback anymore. Normally, select() cancels writer's interest when
calling the write handler, but in this case the call back is triggered not
from select() but from checkTimeouts().

From: 3p1-rock r9597

14 years agoAuthor: Various Translators
Amos Jeffries [Tue, 17 Aug 2010 12:00:58 +0000 (00:00 +1200)] 
Author: Various Translators
Translations Update auto-save

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 17 Aug 2010 00:12:40 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoFixed autoconf-refactor bug: improper handling of default /etc/hosts
Francesco Chemolli [Mon, 16 Aug 2010 21:20:53 +0000 (23:20 +0200)] 
Fixed autoconf-refactor bug: improper handling of default /etc/hosts

14 years agoMoved stubs for calls in main.cc to a specific stub-file.
Francesco Chemolli [Mon, 16 Aug 2010 14:47:39 +0000 (16:47 +0200)] 
Moved stubs for calls in main.cc to a specific stub-file.

14 years agoAuthor: Various Translators
Amos Jeffries [Mon, 16 Aug 2010 12:01:34 +0000 (00:01 +1200)] 
Author: Various Translators
Translations Update auto-save

14 years agoFix missing include for rotate_logs
Amos Jeffries [Mon, 16 Aug 2010 11:35:40 +0000 (05:35 -0600)] 
Fix missing include for rotate_logs

14 years agoTypo on 64-bit builds
Amos Jeffries [Mon, 16 Aug 2010 11:01:32 +0000 (23:01 +1200)] 
Typo on 64-bit builds

14 years agoFix libTrie related build failure if inlining is disabled
Henrik Nordstrom [Mon, 16 Aug 2010 10:42:54 +0000 (12:42 +0200)] 
Fix libTrie related build failure if inlining is disabled

14 years agodist missing files in kerberos helper
Amos Jeffries [Mon, 16 Aug 2010 09:06:58 +0000 (21:06 +1200)] 
dist missing files in kerberos helper

14 years agoConvert ListenStateData to AsyncJob ConnAcceptor
Amos Jeffries [Sun, 15 Aug 2010 12:40:32 +0000 (00:40 +1200)] 
Convert ListenStateData to AsyncJob ConnAcceptor