]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
14 years agoLanguage: sl updates
Aleksa Å uÅ¡uliÄ\87 [Mon, 23 May 2011 02:22:54 +0000 (14:22 +1200)] 
Language: sl updates

14 years agoDBG_IMPORTANT instead of DBG_WARNING
Amos Jeffries [Mon, 23 May 2011 01:49:35 +0000 (13:49 +1200)] 
DBG_IMPORTANT instead of DBG_WARNING

14 years agoURL re-writer handling bug fixes
Amos Jeffries [Sat, 21 May 2011 01:13:42 +0000 (13:13 +1200)] 
URL re-writer handling bug fixes

This patch includes two bug fixes in URL handling which were uncovered
during testing of the URL logging update:

* URL re-write handling was not correctly creating its adapted request
copy. The code here is much reduced by using the clone() method. Still
not completely satisfactory (marked with XXX) since on invalid URL
there is a wasted cycles cloning and deleting almost immediately.
Future cleanups moving the URL parts outside HttpRequest will fix that.

* URL parsing needs to set the canonical field to unset whenever the URI
is re-parsed into a request. This field is an optimization for later
display speed-ups. This has been causing incorrect canonical URL to be
used following re-write. When the cloning above was corrected it caused
asserts in the server-side.

* To prevent memory leaks the urnParse() function internal to URL parsing
is adjusted to accept and update an existing request in identical API
semantics to urlParse() instead of always generating a new one.

14 years agoDocs: display WARNING and ERROR when max_filedescriptors has failed.
Amos Jeffries [Fri, 20 May 2011 13:38:40 +0000 (01:38 +1200)] 
Docs: display WARNING and ERROR when max_filedescriptors has failed.

The big cases of missing OS dependencies and use of select() are mentioned
on configure parse where relevant. As well as from setMaxFD().

Failures to make the change are already logged, but now highlighted as
ERROR cases.

14 years agoFix assertion client_side_reply.cc:662: "r->clientConnectionManager == http->getConn()"
Amos Jeffries [Thu, 19 May 2011 12:02:58 +0000 (06:02 -0600)] 
Fix assertion client_side_reply.cc:662: "r->clientConnectionManager == http->getConn()"

TODO: There is a biger bug in the URL re-write cloning not being right in
general. That is getting a separate and much larger fix in a followup patch.

14 years agoCleanup: shuffle HttpRequest::inheritProperties next to clone()
Amos Jeffries [Wed, 18 May 2011 12:50:48 +0000 (00:50 +1200)] 
Cleanup: shuffle HttpRequest::inheritProperties next to clone()

Making it a bit easier to see exactly what fields are duplicated and which
are not.

14 years agoFix: correctly express libtool 2.2+ requirement.
Francesco Chemolli [Wed, 18 May 2011 11:33:23 +0000 (13:33 +0200)] 
Fix: correctly express libtool 2.2+ requirement.

14 years agoPortability fix: properly detect Iphlpapi.h on windows
Francesco Chemolli [Wed, 18 May 2011 01:03:37 +0000 (03:03 +0200)] 
Portability fix: properly detect Iphlpapi.h on windows

14 years agoFix for "Separate SSL error detail name and message" patch
Christos Tsantilas [Sat, 14 May 2011 06:11:27 +0000 (09:11 +0300)] 
Fix for "Separate SSL error detail name and message" patch

Use "#if USE_SSL / #endif" for printing . Currently we have error details
only for SSL related errors.

14 years agoSeparate SSL error detail name and message
Christos Tsantilas [Fri, 13 May 2011 21:04:03 +0000 (00:04 +0300)] 
Separate SSL error detail name and message

Currently, SSL error detail in Squid-generated error pages (%D) contains
both the error name and the explanation text. Some folks using this feature
want to render the two pieces of information differently because the error
name is not something most end-users should read or focus on.

This patch adds the "%x" error page formating code which prints the error name,
and removes the error name (%err_name) from SSL error detail messages.

This is a Measurement Factory project

14 years agoAuthor: Alex Rousskov <rousskov@measurement-factory.com>
Christos Tsantilas [Fri, 13 May 2011 10:38:28 +0000 (13:38 +0300)] 
Author: Alex Rousskov <rousskov@measurement-factory.com>
Author: Alexey Veselovsky <alexey.veselovsky@eykontech.com>
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
Bug 2055: Honor ICAP Max-Connections

This patch implements the phase 1 of the ICAP Max-Connections feature as it is
described in squid wiki:
  http://wiki.squid-cache.org/Features/ServiceOverload

The behaviour of the patch  can be configured using on_overload and max_conn
options of the icap_service configuration parameter. Squid can be configured
to do one of the following:
  - Block: send and HTTP error response to the subscriber
  - Bypass: ignore the "over-connected" ICAP service
  - Wait: wait (in a FIFO queue) for an ICAP connection slot
  - Force: proceed, ignoring the Max-Connections limit

Squid warns the first time the service become overloaded

For more information please visit the feature wiki page given above.

Technical informations:

The patch starts count a connections to the ICAP server as active when the
ModXact class receives an FD even if the fd is not really connected to the
server yet, and decrease the active connections to the server when the ModXact
object releases its fd connection.

If the Max-Connection limit is reached squid puts the request to a waiters list.
When one or more connections released squid schedules one or more waiters for
execution and remove them from waiters list.
To handle cases where a waiter gone/canceled before its execution the custom
dialer ConnWaiterDialer used.

The Options connections counted as active connections but are not limited by
the Max-Connections limit. An Option request will be executed even if the
maximum connections number is reached.

This is a Measurement Factory project

14 years agoSquid-to-origin SNI for ssl-bump
Christos Tsantilas [Fri, 13 May 2011 07:59:19 +0000 (10:59 +0300)] 
Squid-to-origin SNI for ssl-bump

This patch adds Squid-to-server SSL Server Name Indication (SNI) support to the
outgoing connections in Squid.

This is a Measurement Factory project

14 years agoFix for "Support for slow ssl_bump ACLs" patch
Christos Tsantilas [Wed, 11 May 2011 12:29:30 +0000 (15:29 +0300)] 
Fix for "Support for slow ssl_bump ACLs" patch

Use "#if USE_SSL / #endif" for new ssl bump code added inside
ClientHttpRequest::doCallouts method to allow squid compile if ssl is not
enabled

14 years agoLanguages: Distribute and alias Slovenian
Amos Jeffries [Wed, 11 May 2011 05:04:29 +0000 (17:04 +1200)] 
Languages: Distribute and alias Slovenian

14 years ago"Language: sl added"
Aleksa Å uÅ¡uliÄ\87 [Wed, 11 May 2011 04:43:12 +0000 (16:43 +1200)] 
"Language: sl added"

14 years agoCacheMgr: Fix cache_peer options userhash/sourcehash display mixup
Amos Jeffries [Tue, 10 May 2011 12:51:32 +0000 (00:51 +1200)] 
CacheMgr: Fix cache_peer options userhash/sourcehash display mixup

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 10 May 2011 00:12:40 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoAdd ext_time_quota_acl helper
Tilmann Bubeck [Mon, 9 May 2011 12:42:59 +0000 (00:42 +1200)] 
Add ext_time_quota_acl helper

Allows an administrator to define time budgets for the users of squid
to limit the time using squid.

This is useful for corporate lunch time allocations, wifi portal
pay-per-minute installations or for parental control of children. The
administrator can define a time budget (e.g. 1 hour per day) which is
enforced through this helper.

14 years agoSupport for slow ssl_bump ACLs
Christos Tsantilas [Mon, 9 May 2011 07:48:55 +0000 (10:48 +0300)] 
Support for slow ssl_bump ACLs

Allow slow ACLs with ssl_bump option in squid.conf to enable destination
domain (and possibly other) slow ACL checks.

This is a Measurement Factory project.

14 years agoLink HttpRequest with ConnStateData early
Amos Jeffries [Mon, 9 May 2011 06:40:03 +0000 (18:40 +1200)] 
Link HttpRequest with ConnStateData early

14 years agoQoS: require libcap before enabling netfilter MARK support
Andrew Beverley [Sun, 8 May 2011 23:21:44 +0000 (11:21 +1200)] 
QoS: require libcap before enabling netfilter MARK support

As it is not possible to get or set a netfilter mark without libcap, this
patch will disable netfilter marking at compilation time if libcap is not
available (in a similar way to Linux transparent proxying).

14 years agoCleanup: sync NTLM and Negotiate UserRequest code
Amos Jeffries [Sun, 8 May 2011 13:53:10 +0000 (01:53 +1200)] 
Cleanup: sync NTLM and Negotiate UserRequest code

Minor tweaks to reduce diff between the files. No logic changes.

Renames the addHeader() to addAuthentiocationInfoHeader(),
Renames the addTrailer() to addAuthentiocationInfoTrailer() and
document that they add additional *-Info header to the HTTP reply.

14 years agoCleanup: Improve Connection Pinning management
Amos Jeffries [Sun, 8 May 2011 06:11:18 +0000 (18:11 +1200)] 
Cleanup: Improve Connection Pinning management

Since 1xx handing went in HttpRequest has had two links to the one
ConnStateData managing its client connection.

* Rename the 1xx link to clientConnectionManager (since it is not
  actually the connection, but the manager object controlling the FD
  usage and stats.

* Convert the pinning code to using the permanent clientConnectionManager
  link instead of a temporary pinned_connection link.

This moves all connection pinning state fully into the ConnStateData
manager objects scope.

Side changes that appear to be buggy code previously:

* do not alter pinning state at the point where the pinned connection is
  about to start being used. Changes are only relevant at the point of
  pinning or unpinning.

* unpin operation now closes the Server FD if still open. Previously
  there was the possibility that some code paths would leave server FD
  open and pconn it. (especially since the above mentioned state
  alteration cleared the "pinned" flag).

14 years agoBug 3215: Malformed ipv6 DNS reverse lookup
Amos Jeffries [Sat, 7 May 2011 12:24:15 +0000 (00:24 +1200)] 
Bug 3215: Malformed ipv6 DNS reverse lookup

14 years agoOnly ssl-bump CONNECT requests if they are about to be tunneled.
Amos Jeffries [Sat, 7 May 2011 02:19:06 +0000 (14:19 +1200)] 
Only ssl-bump CONNECT requests if they are about to be tunneled.

Currently all CONNECT requests are bumped, even if the redirectors have
determined a 3xx, 4xx or 5xx reply should happen.

Adapters and access controls use their own duplicated reply paths unaffected
by this bug at present.

14 years agoFix typo in parenthesis of flags test
Amos Jeffries [Sat, 7 May 2011 02:06:37 +0000 (14:06 +1200)] 
Fix typo in parenthesis of flags test

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 7 May 2011 00:12:36 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoImplicit Dependency removal for gcc-4.6.1
Amos Jeffries [Fri, 6 May 2011 16:16:45 +0000 (04:16 +1200)] 
Implicit Dependency removal for gcc-4.6.1

GCC 4.6.1 is stricter than 4.6.0. It does not by default include implicit
dependencies. This adds several unit tests .cc files which were implicitly
linked before.

Also adds tests/stub_DiskIOModule.cc to short-circuit the DiskIOModule API

14 years agoCacheMgr: display -i/+i in regex ACL config display
Amos Jeffries [Fri, 6 May 2011 14:31:36 +0000 (02:31 +1200)] 
CacheMgr: display -i/+i in regex ACL config display

14 years agoBug #3214: "helperHandleRead: unexpected read from ssl_crtd" errors.
Christos Tsantilas [Fri, 6 May 2011 09:17:54 +0000 (12:17 +0300)] 
Bug #3214: "helperHandleRead: unexpected read from ssl_crtd" errors.

Squid would read the beginning of a crtd response split across multiple
read operations and treat it as a complete response, causing various
certificate-related errors.

This patch:
 - allow the use of other than the '\n' character as the end of message mark
   for helper responses.
 - Use the '\1' char as end-of-message char for crtd helper. This char looks
   safe because the crtd messages are clear text only messages.

14 years agoBug 3209: ssl-bumped requests forwarded unencrypted to the parent proxies/caches
Christos Tsantilas [Fri, 6 May 2011 09:10:34 +0000 (12:10 +0300)] 
Bug 3209: ssl-bumped requests forwarded unencrypted to the parent proxies/caches

This patch block all ssl-bumped requests which does not forwarded directly to
origin servers.

A new flag added to the requests_flags to mark http requests which are
ssl-bumped

14 years agoSupport OpenSSL 1.0.0 built without SSLv2
Amos Jeffries [Wed, 4 May 2011 07:19:55 +0000 (19:19 +1200)] 
Support OpenSSL 1.0.0 built without SSLv2

14 years agoCompile fixes for binutils-gold and gcc-4.6 support
Amos Jeffries [Wed, 4 May 2011 03:05:09 +0000 (15:05 +1200)] 
Compile fixes for binutils-gold and gcc-4.6 support

These two tools are much stricter about dependency linkages. We have already
had to drop testAuth due to major dependency loops they dislike.
This makes the remainder of the dependency changes needed.

Also adds:
 - tests/STUB.h with macros for simpler stub file creation
 - stub_libmgr.cc for unit-test stub replacment of mgr/libmgr.la library.
   many API functions commented out, but sufficient for the current needs.

14 years agoDocs: spelling and syntax in manuals
Amos Jeffries [Wed, 4 May 2011 02:44:09 +0000 (14:44 +1200)] 
Docs: spelling and syntax in manuals

14 years agoTranslation .POT updates and docs spelling fixes
Amos Jeffries [Wed, 4 May 2011 02:03:34 +0000 (14:03 +1200)] 
Translation .POT updates and docs spelling fixes

14 years agoLanguage: en updates
Amos [Wed, 4 May 2011 00:07:57 +0000 (12:07 +1200)] 
Language: en updates

14 years agoLanguage: en updates
Amos [Wed, 4 May 2011 00:05:11 +0000 (12:05 +1200)] 
Language: en updates

14 years agoLanguage: en updates
Amos [Tue, 3 May 2011 06:01:46 +0000 (18:01 +1200)] 
Language: en updates

14 years agoDocs: Polish url_rewrite_program description
Colin Coe [Tue, 3 May 2011 03:01:59 +0000 (15:01 +1200)] 
Docs: Polish url_rewrite_program description

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 3 May 2011 00:12:39 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoDrop testAuth unit-tests
Amos Jeffries [Mon, 2 May 2011 13:04:21 +0000 (01:04 +1200)] 
Drop testAuth unit-tests

Preparing to move the tests into src/auth.

These old tests construction style also require quite a lot of dependencies
which include several loops causing problems in modern strict linkers.
Opted to remove now and stabilize trunk without it before re-adding simpler
auth unit tests.

14 years agotypo in ntlm_fake_auth
Amos Jeffries [Mon, 2 May 2011 02:33:27 +0000 (20:33 -0600)] 
typo in ntlm_fake_auth

14 years agoCleanup: base64 coder de-duplication and upgrade
Amos Jeffries [Mon, 2 May 2011 01:14:30 +0000 (19:14 -0600)] 
Cleanup: base64 coder de-duplication and upgrade

Markus Moeller has re-implemented several of the coder functions for use
by Kerberos helpers.

This patch seeks to de-duplicate them and combine the resulting code
back into the libmiscencoding.la "base64.h" implementation.

Changes include:

  * old function API renamed to old_*() and existing code update to use
the names. Some code has been updated to use the new API.

  * new estimator base64_encode_len()/base64_decode_len() functions added
to provide details of much much buffer space the output will require.

  * new API encoder and decoder functions added which accept caller
provided buffers and encode/decode an arbitrary string into them.

  * also fixes a bug where if the input text or output buffer was too
short the coder functions would crop a few bytes off the end of the result.
Noticable in Kerberos where token lengths are not fixed length.

Some optimizations have been added by myself over and above Markus changes:

  * optimized to short-circuit on several more variations of empty input
and nil result buffer.

  * sub-loop optimizations added to reduce the number of if() calls made
by the new code.

  * split encoder into terminated (C-str) and non-terminated variants.

Also documented both old and new APIs functions.

14 years agoAdd external_acl_type %EXT_LOG and %EXT_TAG format options.
James Bowe [Sun, 1 May 2011 12:10:37 +0000 (00:10 +1200)] 
Add external_acl_type %EXT_LOG and %EXT_TAG format options.

%EXT_LOG and %EXT_TAG are filled with the log= and tag= fields
returned by previous external ACLs.

-for a string that never changes after it is set, tag= is suitable.
-for a string that may need updating or overwriting by a later
external_acl, log= is suitable.

Under both circumstances it is conceivable that later external_acls
may need access to the tag= or log= values after they have been set
(e.g. for external_acl debugging, merging log messages, etc).

14 years agoBug 3203: pkg-config replacement broken on Windows
Amos Jeffries [Sun, 1 May 2011 03:03:37 +0000 (15:03 +1200)] 
Bug 3203: pkg-config replacement broken on Windows

14 years agoBug 3205: SSL-bump is broken in trunk
Christos Tsantilas [Thu, 28 Apr 2011 19:32:43 +0000 (22:32 +0300)] 
Bug 3205: SSL-bump is broken in trunk

The bug appeared after commit with revno:11364 which fixes the Bug #3192.

In the case of SSL-bumped connections the ConnStateData::flags.readMore flag
must be reset (set to true) when we are switching to HTTPs,
because we have to read the new unencrypted HTTP request.
This patch reset this flag in ConnStateData::switchToHttps method.

14 years agoUpdate release notes on deny_info changes
Amos Jeffries [Thu, 28 Apr 2011 17:04:06 +0000 (05:04 +1200)] 
Update release notes on deny_info changes

14 years agoPerformance: short-circuit reply_body_max_size ACL tests
Amos Jeffries [Wed, 27 Apr 2011 23:48:03 +0000 (11:48 +1200)] 
Performance: short-circuit reply_body_max_size ACL tests

In the common default case there are no reply body limits configured.
There is no need to construct ACL checklists for testing. This saves
one allocation and several locking/unlocking cycles per request.

14 years agoBug fix: A dirty last/unused item left after Vector<>::shift
Christos Tsantilas [Tue, 26 Apr 2011 10:15:04 +0000 (13:15 +0300)] 
Bug fix: A dirty last/unused item left after Vector<>::shift

This is an old Vector<> bug that left a dirty last/unused item after
shift(). This causes problems if stored values have destructors.

14 years agoPortability fix: explicitly state dependency on libtool 2.2+ and enforce it
Francesco Chemolli [Sat, 23 Apr 2011 07:11:07 +0000 (09:11 +0200)] 
Portability fix: explicitly state dependency on libtool 2.2+ and enforce it

14 years agoPortability fix: always install libltdl and change autoconf initialization
Francesco Chemolli [Sat, 23 Apr 2011 05:32:01 +0000 (07:32 +0200)] 
Portability fix: always install libltdl and change autoconf initialization

14 years agoDocs: clarify bits/bytes on delay pools
Amos Jeffries [Wed, 20 Apr 2011 07:11:27 +0000 (01:11 -0600)] 
Docs: clarify bits/bytes on delay pools

14 years agoAdd errpages option %b for proxy listening port
Amos Jeffries [Wed, 20 Apr 2011 06:07:08 +0000 (18:07 +1200)] 
Add errpages option %b for proxy listening port

Use getMyPort() to insert the forward-proxy listening port into error
pages and deny_info redirect URLs. This fixes the current port
hard-coding assumption in ERR_AGENT_CONFIGURE.

The %b option is added for this purpose as a temporary measure until the
codes are merged with the more flexible log formatting set.

This currently depends on squid.conf having a particular http_port
ordering with the forward-proxy port listed first.

14 years agoSourceLayout: Add enum Direction for AuthUserRequests state logics
Amos Jeffries [Wed, 20 Apr 2011 05:08:16 +0000 (17:08 +1200)] 
SourceLayout: Add enum Direction for AuthUserRequests state logics

The state of credentials lookup and handling is recorded by
authenticateDirection / AuthUserRequest::direction() and its per-scheme
helper methods AuthUserRequest::module_direction().

This formalizes and coordinates the state being returned by using a
shared enum.

The states can generally be considerd as:
 - LOOKUP with a helper still needs to validate the credentials
 - CHALLENGE if the helepr needs more info from the client
 - VALID if everything is fine and the credentials are known Good/Bad
 - ERROR if there is any problem with the state or credentials

TODO:
 This combination has highlighted a few strange things in the NTLM and
Negotiate states. Where known but Failed credentials are marked as ERROR.
This needs closer investigation why it is not a CHALLENGE in all auth
schemes.

 Also there is a little obfuscation of the cases around the generalized
fixHeader() calls. This will be handled in a followup patch.

14 years agonegotiate_wrapper_auth: fix strict compiler warnings
Amos Jeffries [Tue, 19 Apr 2011 13:20:31 +0000 (01:20 +1200)] 
negotiate_wrapper_auth: fix strict compiler warnings

14 years agoTypos in 3.1 release notes
Amos Jeffries [Mon, 18 Apr 2011 14:42:25 +0000 (02:42 +1200)] 
Typos in 3.1 release notes

14 years agoPrep for 3.1.12.1 and 3.2.0.7
Amos Jeffries [Mon, 18 Apr 2011 12:27:45 +0000 (06:27 -0600)] 
Prep for 3.1.12.1 and 3.2.0.7

14 years agoBundle pkg.m4 from pkg-config 0.25
Scott James Remnant [Mon, 18 Apr 2011 10:22:30 +0000 (22:22 +1200)] 
Bundle pkg.m4 from pkg-config 0.25

These macros are required for ./configure to run on an OS such as MingW.

The macro to detect pkg-config being present is usualy only bundled with
pkg-config. When there is no pkg-config installed ./configure will fail.
This allows our configure to detect the absence and mark some components
as unavailable or unusable.

14 years agoFixes NTLM and Negotiate auth assertion "RefCountCount() == 2"
Amos Jeffries [Sun, 17 Apr 2011 03:35:52 +0000 (21:35 -0600)] 
Fixes NTLM and Negotiate auth assertion "RefCountCount() == 2"

It turns out the replay cache and invalid RefCount cases this was added to
protect againt are not present anyway. After some minor cleanup to remove
double-calls in Negotiate things appear to run nicely.

NOTE:
 There is still a risk that these problem cases may in future occur, but
 meanwhile we need NTLM and Negotiate to be usable and efficient.
 The bugs resulting from those can be dealt with if/when they do occur.

14 years agonegotiate_wrapper_auth: various portability fixes
Amos Jeffries [Sat, 16 Apr 2011 14:43:18 +0000 (02:43 +1200)] 
negotiate_wrapper_auth: various portability fixes

14 years agonegotiate_wrapper_auth: version 1.0.1
Markus Moeller [Fri, 15 Apr 2011 11:51:15 +0000 (05:51 -0600)] 
negotiate_wrapper_auth: version 1.0.1

A helper to perform Negotaite authentication in both its Negotiate/NTLM
and Negotiate/Kerberos forms.
Makes use of additional Squid helpers after unwrapping the header token.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 15 Apr 2011 00:12:31 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoSourceLayout: namesapce for Auth::User children
Amos Jeffries [Thu, 14 Apr 2011 02:40:59 +0000 (20:40 -0600)] 
SourceLayout: namesapce for Auth::User children

Also, shuffle the resulting classes into their own compilation units.

No Logic changes.
Have omitted shuffling or altering two Auth::Basic::User methods handling
the validation short-circuit since these shodul not be part of that class.
Followup patch will move them appropriately.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 13 Apr 2011 00:12:37 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoManager: send User-Agent header from cachemgr.cgi
Amos Jeffries [Tue, 12 Apr 2011 11:33:32 +0000 (23:33 +1200)] 
Manager: send User-Agent header from cachemgr.cgi

Uses hard-coded string "cachemgr.cgi/" instead of progname to avoid
complications from alternative names and when running under a browser.

May be elided in transit however teh VERSION sent here will help the
queried proxy respond appropriate to the CGI capabilities as we extend
the types and content of reports coming back from the future releases.

14 years agoSourceLayout: add missing CredentialState.h
Amos Jeffries [Tue, 12 Apr 2011 06:01:32 +0000 (00:01 -0600)] 
SourceLayout: add missing CredentialState.h

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 12 Apr 2011 00:12:32 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoSourceLayout: namespace for Auth::User
Amos Jeffries [Mon, 11 Apr 2011 14:08:54 +0000 (08:08 -0600)] 
SourceLayout: namespace for Auth::User

No logic changes.

14 years agoImport SN.png correctly as binary.
Amos Jeffries [Mon, 11 Apr 2011 06:09:21 +0000 (18:09 +1200)] 
Import SN.png correctly as binary.

14 years agoRe-fix icons/ FHS compliance
Amos Jeffries [Mon, 11 Apr 2011 06:05:36 +0000 (18:05 +1200)] 
Re-fix icons/ FHS compliance

It seems I was working out of an outdated copy of the FHS.
Current standards describe /var/www as deprecated.

Reverting the icons location back to where it started.

14 years agoSourceLayout: Shuffle InitAuthSchemes() to Auth::Init()
Amos Jeffries [Mon, 11 Apr 2011 03:25:32 +0000 (21:25 -0600)] 
SourceLayout: Shuffle InitAuthSchemes() to Auth::Init()

No logic changes.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 11 Apr 2011 00:12:56 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoBug 3183: Invalid URL accepted with url host part of only '@'.
Amos Jeffries [Sun, 10 Apr 2011 02:00:38 +0000 (14:00 +1200)] 
Bug 3183: Invalid URL accepted with url host part of only '@'.

3.0 results in an ICAP segfault handling these URLs.

Newer releases do not segfault as easily, but still accept the invalid
URL and there may be other unknown side-effects.

Makes the URL parser present ERR_INVALID_URL for this edge case.

14 years agoSourceLayout: namespace for Auth::Config children
Amos Jeffries [Sun, 10 Apr 2011 01:31:59 +0000 (19:31 -0600)] 
SourceLayout: namespace for Auth::Config children

No Logic changes.

Also, no code shuffling which should normally have been done with namespace.
Config children are currently too intwined with UserRequest children and
helper management. Logic changes are required before that can be done.

14 years agoPortability: allow GnuRegex to use libcompat min()/max()
Amos Jeffries [Sat, 9 Apr 2011 13:31:29 +0000 (01:31 +1200)] 
Portability: allow GnuRegex to use libcompat min()/max()

14 years agoPortability: aio.h suffers from GCC-specific hacks on Linux 64-bit
Amos Jeffries [Sat, 9 Apr 2011 06:36:51 +0000 (18:36 +1200)] 
Portability: aio.h suffers from GCC-specific hacks on Linux 64-bit

64-bit file support on 32-bit systems uses GCC-specific #define to convert
the functions to 64-bit API but omits the struct aiocb passed as paremeter.

GCC seems not to mind, but non-GCC compilers barf on the invalid types.

14 years agoSourceLayout: namespace for Auth::Config
Amos Jeffries [Sat, 9 Apr 2011 04:25:23 +0000 (22:25 -0600)] 
SourceLayout: namespace for Auth::Config

Also renames symbol Auth::authConfig to Auth::ConfigVector to clarify
that it is a vector<> of Auth::Config objects or children.

No logic changes.

14 years agoBug 3192: comm.cc:216: "fd_table[fd].halfClosedReader != NULL"
Alex Rousskov [Sat, 9 Apr 2011 04:01:00 +0000 (22:01 -0600)] 
Bug 3192: comm.cc:216: "fd_table[fd].halfClosedReader != NULL"
Polished request reading code to fix CONNECT double-read assertion.

ConnStateData::flags.readMoreRequests, do_next_read variables, and
ClientSocketContext::mayUseConnection() methods were used (or unused!)
incorrectly or inconsistently.

This change removes all do_next_read variables to simplify the state. Instead,
the renamed ConnStateData::flags.readMore indicates whether client_side.cc
should call comm_read. The mayUseConnection() methods are now used to indicate
whether the next client-sent byte (buffered or read) should be reserved for
the current request rather than being interpreted as the beginning of the next
request.

Usually,
                      flags.readMore  mayUseConnection
      basic requests:     true             false
requests with bodies:     true             true
  malformed requests:     false            false
             tunnels:     false            true

14 years agoPortability: a bit more dirent_t in squidpurge tool
Amos Jeffries [Sat, 9 Apr 2011 03:23:50 +0000 (15:23 +1200)] 
Portability: a bit more dirent_t in squidpurge tool

14 years agoBug 3194: selinux may prevent ntlm_smb_lm_auth from using /tmp
David Hill [Sat, 9 Apr 2011 02:37:59 +0000 (14:37 +1200)] 
Bug 3194: selinux may prevent ntlm_smb_lm_auth from using /tmp

14 years agoBug 3185: 3.1.11 fails to compile on OpenBSD 4.8 and 4.9
Amos Jeffries [Fri, 8 Apr 2011 13:15:03 +0000 (01:15 +1200)] 
Bug 3185: 3.1.11 fails to compile on OpenBSD 4.8 and 4.9

14 years agoPortability: and dirent_t also only matters for non-GCC.
Amos Jeffries [Fri, 8 Apr 2011 12:31:09 +0000 (00:31 +1200)] 
Portability: and dirent_t also only matters for non-GCC.

14 years agoPortability: dirent_t cannot be a typedef
Amos Jeffries [Fri, 8 Apr 2011 02:37:19 +0000 (14:37 +1200)] 
Portability: dirent_t cannot be a typedef

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 8 Apr 2011 00:12:34 +0000 (18:12 -0600)] 
SourceFormat Enforcement

14 years agoPortability Fix: getrlimit() / setrlimit() incompatible type 'struct rlimit'
Amos Jeffries [Thu, 7 Apr 2011 14:52:13 +0000 (02:52 +1200)] 
Portability Fix: getrlimit() / setrlimit() incompatible type 'struct rlimit'

On Linux (at least) with large file support but not full 64-bit environment.

The getrlimt / setrlimit are #define'd to getrlimite64 / setrlimit64
BUT, the struct rlimit internal fields are updated to 64-bit types individually
instead of a matching #define to struct rlimit64 as a whole.

One can only assume that GCC is casting to void* or some such major voodoo
which hides this type collision.

14 years agoPortability: glob.h requires GCC to compile on Linux.
Amos Jeffries [Thu, 7 Apr 2011 13:41:25 +0000 (01:41 +1200)] 
Portability: glob.h requires GCC to compile on Linux.

14 years agoEnable MemBlob to use the services of MemPools.
Francesco Chemolli [Thu, 7 Apr 2011 13:26:54 +0000 (15:26 +0200)] 
Enable MemBlob to use the services of MemPools.

Ensure that MemBlobs use MemPools manage memory areas, and remove
duplication of code with MemPools.

14 years agoICC: size_t is guaranteed to be >=0
Amos Jeffries [Thu, 7 Apr 2011 12:42:02 +0000 (00:42 +1200)] 
ICC: size_t is guaranteed to be >=0

14 years agoICC: support 64-bit environments dirent definitions
Amos Jeffries [Thu, 7 Apr 2011 11:58:46 +0000 (23:58 +1200)] 
ICC: support 64-bit environments dirent definitions

struct dirent is not consistently defined for 32-bit and 64-bit enabled
environments. Provide a dirent_t type defined appropriate to the environment
for use instead.

14 years agoFix ModPoll signedness checks
Amos Jeffries [Thu, 7 Apr 2011 09:23:06 +0000 (21:23 +1200)] 
Fix ModPoll signedness checks

This npending test bug was preventing any poll() errors from being
noticed and displayed. Possibly leading to some of the weird hanging
reports we have been unable to replicate.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 7 Apr 2011 00:18:17 +0000 (18:18 -0600)] 
SourceFormat Enforcement

14 years agoExtend the number and size of String MemPools
Francesco Chemolli [Wed, 6 Apr 2011 22:45:40 +0000 (00:45 +0200)] 
Extend the number and size of String MemPools

Define and enable 512-bytes, 1kb, 4kb and 16kb mempooled strings
to cover expected upcoming uses

14 years agoFixed chunked request forwarding in ICAP REQMOD presence.
Alex Rousskov [Wed, 6 Apr 2011 16:25:36 +0000 (10:25 -0600)] 
Fixed chunked request forwarding in ICAP REQMOD presence.

ICAP prohibits forwarding of hop-by-hop headers in HTTP headers. If the virgin
request has a "Transfer-Encoding: chunked" header, the ICAP server will not
receive it. Thus, when the ICAP server responds with a 200 OK and what it
thinks is a copy of the HTTP request, the adapted request will be missing the
Transfer-Encoding header.

One the server side, Squid used to test whether the request had a
Transfer-Encoding header to determine whether request chunking is needed when
talking to the next HTTP hop. That test would fail in ICAP REQMOD presence.

This change implements a more direct/robust check: if we do not know the
request content length, we chunk the request.

We also no longer forward the Content-Length header if we are chunking. It
should not really be there in most cases, but an explicit check is safer and
may also prevent request smuggling attacks via Connection: Content-Length
tricks.

14 years agoPortability: Provide stdio wrappers for 64-bit in cstdio C++ builds
Francesco Chemolli [Wed, 6 Apr 2011 13:58:14 +0000 (01:58 +1200)] 
Portability: Provide stdio wrappers for 64-bit in cstdio C++ builds

stdio.h in that case on provides fgetpos64, fopen64 if
__USE_FILE_OFFSET64 is defined. It then checks whether a gcc-specific
 __REDIRECT macro is available (defined in sys/cdefs.h, depending on
__GNUC__ begin available).

If it is not available, it does a preprocessor #define.

Which <cstdio> undefines, with this comment:
 "// Get rid of those macros defined in <stdio.h> in lieu of real functions.".
When it does a namespace redirection ("namespace std { using ::fgetpos; }")
it goes blam, as fgetpos64 is available, while fgetpos is not.

To fix it, we need to supply global functions matching those
signatures (not macros).

e.g.

#include <stdio.h>
#if defined(__USE_FILE_OFFSET64) &&!defined(__REDIRECT) && defined(fgetpos)
#undef fgetpos
int fgetpos (FILE * f, fpos64_t *p) { return fgetpos64(f,p); }
#endif
#include <cstdio>

This every time we use <cstdio> (directly or indirectly).

This is triggered by us defining -D_FILE_OFFSET_BITS=64 when
--enable-large-files configure is used.

14 years agoEnable string mempools to work correctly during initialization phase
Francesco Chemolli [Wed, 6 Apr 2011 10:40:10 +0000 (12:40 +0200)] 
Enable string mempools to work correctly during initialization phase

Makes string mempools work before Mem::Init() was called, as may happen
during global variable initialization or early main.cc processing. If
needed, strings allocated before the Mem::Init() call are given an extra
buffer space to make sure the allocated buffer size will not match any
string pool size during deallocation.
Shortcomings: We now waste RAM on buffer increase for early allocated
strings unless they are already bigger than the maximum supported string
pool size. Statistics for early allocations are broken. Non-string
mempools still do not support early allocations.

14 years agoFixed %dt logging in the presence of REQMOD.
Alex Rousskov [Tue, 5 Apr 2011 21:39:53 +0000 (15:39 -0600)] 
Fixed %dt logging in the presence of REQMOD.

We use LogEntry::request to save a virgin request for future logging. However,
when that request is adapted and replaced, the adapted request has all the
stats while the saved virgin request lacks them. We have already copied error
details from the adapted to logged/virgin request. Now we copy the DNS wait
time (%dt) as well.

TODO: Move statistics to a stand-alone history object that adapted and
virgin requests can share. Longer term, we should separate HttpRequest
from Master Transaction so that we can store virgin request details without
implicitly storing not-yet-collected master transaction stats.

14 years agoPolished adaptation_send_client_ip and adaptation_uses_indirect_client docs.
Alex Rousskov [Tue, 5 Apr 2011 20:57:57 +0000 (14:57 -0600)] 
Polished adaptation_send_client_ip and adaptation_uses_indirect_client docs.

14 years agoDisplay ERROR in cache.log for invalid configured paths
Amos Jeffries [Tue, 5 Apr 2011 13:04:11 +0000 (01:04 +1200)] 
Display ERROR in cache.log for invalid configured paths

The validator that checks system paths for files and directories in the
configuration file sends error messages to stderr. It should send them to
cache.log for the admin to see easily.

Also, this makes the error display as FATAL ERROR when using -k parse to
indicate that it is fatal to the startup. Other management signals where
it is not necessarily fatal will only display as an ERROR.

14 years agoDocs: clarify delay_parameters
Amos Jeffries [Mon, 4 Apr 2011 22:57:34 +0000 (10:57 +1200)] 
Docs: clarify delay_parameters

14 years agoPropagate pre-processor directives from enum definition to strings definition
Amos Jeffries [Mon, 4 Apr 2011 12:57:49 +0000 (00:57 +1200)] 
Propagate pre-processor directives from enum definition to strings definition

This allows enum to contain conditional entries and build without them.