]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
13 years agoAdd omitted Makefile generation
Amos Jeffries [Sun, 26 Dec 2010 02:07:17 +0000 (15:07 +1300)] 
Add omitted Makefile generation

13 years agoAuthor: Marcello Romani <marcello.romani@libero.it>
Amos Jeffries [Sun, 26 Dec 2010 01:38:26 +0000 (14:38 +1300)] 
Author: Marcello Romani <marcello.romani@libero.it>
Author: Amos Jeffries <squid3@treenet.co.nz>
Database Logging Daemon

Original code by Marcello Romani, this version has some additions to
initialize any missing database tables depended on during its startup
phase and some additional polish to fit within the current Squid release.

COPYRIGHT AND LICENSE

Copyright (C) 2008 by Marcello Romani

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.

13 years agoCPU profiler is a dev testing feature. Disable by default.
Amos Jeffries [Fri, 24 Dec 2010 14:00:09 +0000 (07:00 -0700)] 
CPU profiler is a dev testing feature. Disable by default.

13 years agoPrep for 3.1.10 and 3.2.0.4
Amos Jeffries [Wed, 22 Dec 2010 03:14:21 +0000 (16:14 +1300)] 
Prep for 3.1.10 and 3.2.0.4

13 years agohttp_port display cleanup
Amos Jeffries [Mon, 20 Dec 2010 23:52:52 +0000 (16:52 -0700)] 
http_port display cleanup

 * ignore-cc is a violation when not on accel ports.

13 years agoUse the right printf args for client_request_buffer_max warning
Amos Jeffries [Fri, 17 Dec 2010 12:59:35 +0000 (05:59 -0700)] 
Use the right printf args for client_request_buffer_max warning

13 years agoAdd docs and prevent parse loops on client_request_buffer_max
Amos Jeffries [Fri, 17 Dec 2010 05:46:37 +0000 (22:46 -0700)] 
Add docs and prevent parse loops on client_request_buffer_max

13 years agoCompat: static functions cannot be passed externally
Amos Jeffries [Thu, 16 Dec 2010 02:25:55 +0000 (19:25 -0700)] 
Compat: static functions cannot be passed externally

13 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 16 Dec 2010 01:15:12 +0000 (18:15 -0700)] 
SourceFormat Enforcement

13 years agoAuthor: Chad Naugle <chad.naugle@travimp.com>
Amos Jeffries [Wed, 15 Dec 2010 21:59:50 +0000 (14:59 -0700)] 
Author: Chad Naugle <chad.naugle@travimp.com>
ext_edirectory_user_ip: hack fix -3 result in StringSplit algorithm

13 years agoext_edirectory_userip_acl: alternative split algorithms
Amos Jeffries [Wed, 15 Dec 2010 12:13:01 +0000 (05:13 -0700)] 
ext_edirectory_userip_acl: alternative split algorithms

Some compilers do not support dynamically allocated stack space.
Instead perform a scan and hunk copy/wipe of the passed buffers directly.
As a side effect the split is no longer triple-copying data and
double-memset'ing.

13 years agoDocumentation fixes
Amos Jeffries [Wed, 15 Dec 2010 10:12:22 +0000 (23:12 +1300)] 
Documentation fixes

13 years agoAuthor: Graham Keeling <graham@equiinet.com>
Christos Tsantilas [Wed, 15 Dec 2010 09:38:03 +0000 (11:38 +0200)] 
Author: Graham Keeling <graham@equiinet.com>
Bug 3113: Squid can eat far too much memory when uploading files

Problem description:
  Uploading a large file to a web site on the internet, squid's client
input buffer will increase far faster than it can be emptied to
the target website, and the machine will swiftly run out of memory.

This patch adds the client_request_buffer_max_size configuration
parameter  which specifies the maximum buffer size of a client request.

13 years agoVarious source format cleanups
Henrik Nordstrom [Tue, 14 Dec 2010 14:01:14 +0000 (15:01 +0100)] 
Various source format cleanups

undo damage done by earlier astyle versions and adjust some
imported code to follow reasonable style. no functional change.

13 years agoFix the "Report ERR_SECURE_CONNECT_FAIL details" patch (rev 11122)
Christos Tsantilas [Tue, 14 Dec 2010 12:17:34 +0000 (14:17 +0200)] 
Fix the "Report ERR_SECURE_CONNECT_FAIL details" patch (rev 11122)

Looks that the error_t is a define in some platforms. Rename Ssl::error_t to
Ssl::ssl_error_t to avoid compile problems

13 years agoCompat: define #define PRINTF_FORMAT_ARG* for non-gcc compilers
Amos Jeffries [Tue, 14 Dec 2010 03:35:01 +0000 (20:35 -0700)] 
Compat: define #define PRINTF_FORMAT_ARG* for non-gcc compilers

13 years agoFreeBSD: slightly better version test for pthread support
Amos Jeffries [Tue, 14 Dec 2010 02:54:35 +0000 (19:54 -0700)] 
FreeBSD: slightly better version test for pthread support

The old one could not handle minor releases. This one only looks at the
first byte of the numeric version. So will break again when 10.* is released.

However 6.* should be dead by then.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 14 Dec 2010 01:12:24 +0000 (18:12 -0700)] 
SourceFormat Enforcement

13 years agoReport ERR_SECURE_CONNECT_FAIL details to the user via a new error detail API.
Christos Tsantilas [Mon, 13 Dec 2010 23:02:52 +0000 (01:02 +0200)] 
Report ERR_SECURE_CONNECT_FAIL details to the user via a new error detail API.

Currently, the ERR_SECURE_CONNECT_FAIL response contains no usable error
information. Moreover, there is no interface to pass SSL error information
to the response generation code.

This patch adds an interface to allow Squid error responses to contain detailed
information about SSL certificate verification failure. For example, the error
message may contain the following text:
 "Server Certificate Verification Failed: Certificate Common Name
  (www.lufthansa.com) does not match the host name you are connecting to
  (www.lufthansa.de)."

This is a Measurement Factory project.

Change details:
--------------------

- errorpage.cc/.h: The error page now supports the '%D'  formating code to
  display the detail string passed by modules. The detail strings passed by
  modules can contain error page formating codes. Currently only SSL detail
  errors messages are supported.

- A new class Ssl::ErrorDetail defined in ssl/ErrorDetail.[cc,h]
  The Ssl::ErrorDetail objects passed to the SSL verification callback functions
  (sl_verify_cb callback function defined in support.cc) and filled with error
  detail data (error_no and a pointer to the X509 Certificate) in the case of
  an error and passed back to the forward.cc code.

- The Ssl::ErrorDetail class internally uses (hard coded) templates and
  formating codes to allow supporting multiple languages and adding easily
   new features

Other changes:
-------------------

- errorpage.cc/.h: The BuildContent method split to BuildContent and ConvertText
  method. The second method does the real conversion from a given text template
  to output. It is used now to allow formating the detail strings passed with
  %D.

 - sslparseErrorString moved to ssl/ErrorDetail.cc file and renamed to
   Ssl::parseErrorString

 - sslFindErrorString moved to ssl/ErrorDetail.cc file and renamed to
   Ssl::getErrorName

 - The ssl_error_t typedef definition moved from ssl/support.h to
   ssl/ErrorDetail.h and renamed to Ssl::error_t

13 years agoCompat: cleanup several config.h hacks
Amos Jeffries [Mon, 13 Dec 2010 11:31:14 +0000 (00:31 +1300)] 
Compat: cleanup several config.h hacks

* removes the xmemcpy and xmemmove hacks. Squid has been building for some
  long time without them being consistently used all-over. No complaints.
  bcopy() alternative is still use if needed. However main code can now
  use memcpy( )and memmove() without special X knowledge.

* shuffle strnstr replacement into libcompat from libmisc

* shuffles xis*() function wrappers for is*() with type-casting into compat

No operational changes.

13 years agoFix switch wrapping in log Format custom
Amos Jeffries [Mon, 13 Dec 2010 01:52:37 +0000 (18:52 -0700)] 
Fix switch wrapping in log Format custom

13 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 13 Dec 2010 01:12:30 +0000 (18:12 -0700)] 
SourceFormat Enforcement

13 years agoHandle early eCAP transaction failures better.
Alex Rousskov [Sun, 12 Dec 2010 23:29:26 +0000 (16:29 -0700)] 
Handle early eCAP transaction failures better.

Do not throw an exception if eCAP transaction had to deal with a virgin body
but was not consuming it at swangSong() time. This may happen if the eCAP
adapter throws an exception before the adapter requests the virgin body
transmission or after it stops the transmission. In other words, the
transaction wrapper consumes only if proxyingVb is on.

13 years agoAdd omitted Format Token includes
Amos Jeffries [Sun, 12 Dec 2010 12:51:33 +0000 (05:51 -0700)] 
Add omitted Format Token includes

13 years agoSourceLayout: cleanup the various log line formatting code
Amos Jeffries [Sun, 12 Dec 2010 05:30:58 +0000 (22:30 -0700)] 
SourceLayout: cleanup the various log line formatting code

Adds:

* namespace Log::Format for log display functionality. Each line formater
  is a global function inside here. The log format enum is also in here
  along with the display encoding 'gadget' functions.

* namespace Time in SquidTime.h for the related time string display
  functions. Unified the various log pretty-print httpd-style time
  functions into Time::FormatHttpd(time_t).
 ** care has been taken to preserve the local-static optimization found
    in accessLogTime() to prevent wasted cycles re-printing the same
    time value more than once per second.

NP: the similar but timezone-missing format is now Time::FormatStrf()
    with the same optimization applied to speed up its callers.

* namespace Math:: to avoid symbol clash with global function Log() and
  namespace Log.

* support for the Apache "combined" log format. Was documented earlier as
  being available but not actually present.

Obsoletes:

* forward_log directive and associated experimental code. If needed
  we can easily add another special format to dump the details.
  FWIW they are all available in the squid format anyway (timestamp,
  squid status, source peer). The documented action of dumping every
  forwarding attempt was not working.

* referer_log and useragent_log directives and matching ./configure options.
 ** shuffled into access_log formats "referrer" and "useragent" for more
    flexibility with less directives.

* emulate_httpd_log replaced with Apache "common" format.

* the "auto" pseudo-format becomes obsolete with emulat_httpd_log.
  default is now "squid" format in all situations.

Code Shuffles:

* moved the logformat directive parsing into LogConfig object methods.

* shuffled the logformat parsing and token code into src/log/Tokens.h|cc
 ** this is purely to break it out of access_log.cc. namespace and scoping
    needs some work.

13 years agoThe memPoolAlloc counter never updated
Christos Tsantilas [Fri, 10 Dec 2010 18:04:41 +0000 (20:04 +0200)] 
The memPoolAlloc counter never updated

13 years agoThe HTTP/ICP requests/messages per minute are not correct when multiple workers used
Christos Tsantilas [Fri, 10 Dec 2010 17:32:43 +0000 (19:32 +0200)] 
The HTTP/ICP requests/messages per minute are not correct when multiple workers used

The HTTP requests/min and ICP messages/min are the sum of the corresponding
kids values not the average.

13 years agoRemove/update references to configure.in
Amos Jeffries [Fri, 10 Dec 2010 09:59:02 +0000 (02:59 -0700)] 
Remove/update references to configure.in

13 years agoPolicy: cleanup some duplicate config.h includes
Amos Jeffries [Fri, 10 Dec 2010 09:49:50 +0000 (02:49 -0700)] 
Policy: cleanup some duplicate config.h includes

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 10 Dec 2010 01:12:26 +0000 (18:12 -0700)] 
SourceFormat Enforcement

13 years agoAuthor: Chad Naugle <chad.naugle@travimp.com>
Amos Jeffries [Thu, 9 Dec 2010 08:55:19 +0000 (01:55 -0700)] 
Author: Chad Naugle <chad.naugle@travimp.com>
Bug 2905: ext_edirectory_userip_acl: buffer handling updates

13 years agoRename libTrie configure.in to configure.ac as well
Amos Jeffries [Wed, 8 Dec 2010 11:19:56 +0000 (04:19 -0700)] 
Rename libTrie configure.in to configure.ac as well

13 years agoTolerate adapted body delivery failures in REQMOD request satisfaction mode.
Alex Rousskov [Tue, 7 Dec 2010 19:32:43 +0000 (12:32 -0700)] 
Tolerate adapted body delivery failures in REQMOD request satisfaction mode.

Without these changes, Squid may assert if an ICAP or eCAP service fails
while delivering response body in REQMOD:
    assertion failed: client_side.cc:1438: "rep"

Other assertions may be possible as well, because we were trying to
serve a freshly built, HttpReply-free error response while already
writing the REQMOD "request satisfaction" response. The assertion
probably depends on that writing stage (wrote nothing yet, wrote
headers, wrote some body, etc).

Polished ERR_DETAIL constants to distinguish the special "request
satisfaction" case and to remove ICAP-specific labels from general
adaptation code.

13 years agoSupport upcoming "fresh message creation" eCAP API.
Alex Rousskov [Tue, 7 Dec 2010 19:10:11 +0000 (12:10 -0700)] 
Support upcoming "fresh message creation" eCAP API.

Adapters need "fresh" (i.e., empty and not cloned) messages to support
"request satisfaction" mode and other cases where cloning a virgin message is
not possible or is awkward because the adapted message is not an adjusted
version of the virgin one.

13 years agoFreeBSD 7.x required for pthreads support
Amos Jeffries [Tue, 7 Dec 2010 11:23:40 +0000 (04:23 -0700)] 
FreeBSD 7.x required for pthreads support

13 years agoPolish on cache_dir min-size port
Amos Jeffries [Tue, 7 Dec 2010 09:14:33 +0000 (02:14 -0700)] 
Polish on cache_dir min-size port

13 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 7 Dec 2010 01:12:43 +0000 (18:12 -0700)] 
SourceFormat Enforcement

13 years agoBootstrapped
Automatic source maintenance [Tue, 7 Dec 2010 01:11:16 +0000 (18:11 -0700)] 
Bootstrapped

13 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
Henrik Nordstrom [Mon, 6 Dec 2010 21:23:54 +0000 (22:23 +0100)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Correct libasl dependency probe for kerberos_ldap_group

13 years agofix compile error on OpenSolaris using SunStudio CC
Christos Tsantilas [Mon, 6 Dec 2010 20:06:08 +0000 (22:06 +0200)] 
fix compile error on OpenSolaris using SunStudio CC

The way the TidyPointer used inside ssl/gadgets.h which included
through ssl/support.h in squid.h file  requires the ssl libraries
linked with every binary, even if not realy needed.
To solve this probelm remove the 'include "ssl/support.h"' line
from the squid.h and add it only where required.

13 years agoThe *_free SSL API functions can not be used with TidyPointer in some OSes/compilers
Christos Tsantilas [Mon, 6 Dec 2010 14:12:56 +0000 (16:12 +0200)] 
The *_free SSL API functions can not be used with TidyPointer in some OSes/compilers

The *_free SSL functions are declared as extern "C" and can not be used as
DeAllocator argument of the TidyPointer class with some compilers and OSes.
To solve this problem:

- Define the CtoCpp1 macro to allow easy implementation of the C++ equivalent
  function of an extern C function.
  Currently defined in gadgets.h file, if required in the future can be
  moved to TidyPointer.h file
- Use the CtoCpp macro to define the X509_free_cpp
- Remove the Ssl::BIO_free_wrapper function does not needed any more

13 years agoRemove the TidyPointer::deAllocator member does not really needed. Use
Christos Tsantilas [Mon, 6 Dec 2010 14:11:46 +0000 (16:11 +0200)] 
Remove the TidyPointer::deAllocator member does not really needed. Use
directly the DeAllocator function given as template argument instead.

13 years agoFix 'can't create ./src/***: No such file' errors on linking
Amos Jeffries [Mon, 6 Dec 2010 14:06:06 +0000 (03:06 +1300)] 
Fix 'can't create ./src/***: No such file' errors on linking

Side effect of the AIX port fixes using .o instead of duplicating and
re-building the .cc individually. "It seemed a good idea at the time"(tm).
It is a bit strange that it should only show up now, those changes were
made long ago.

Anyways, I've come to the conclusion from other places that the rebuild is
slower to compile but a lot safer to deal with linkage and dependencies.

13 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
Amos Jeffries [Mon, 6 Dec 2010 13:53:59 +0000 (02:53 +1300)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Updated Kerberos header includes

Better heimdal support as new heimdal version have gssapi_krb5 header
files which were in the past only in older MIT releases available.

13 years agoFreeBSD: search /usr/local/include/libxml2 for libxml2 headers
Amos Jeffries [Mon, 6 Dec 2010 13:04:00 +0000 (06:04 -0700)] 
FreeBSD: search /usr/local/include/libxml2 for libxml2 headers

13 years agoFix host OS detection in configure.ac
Amos Jeffries [Mon, 6 Dec 2010 08:24:12 +0000 (01:24 -0700)] 
Fix host OS detection in configure.ac

squid_host_os was being left with the version appended. Which screwed all
the switch and if cases which depended on exact matching the name only.

This corrects the squid_host_os to not contain numeric versions and also
corrects several of the test cases using host_os instead of squid_host_os
or using squid_host_os with version digits.

13 years agoBootstrapped
Automatic source maintenance [Mon, 6 Dec 2010 01:10:52 +0000 (18:10 -0700)] 
Bootstrapped

13 years agoBuild libprofiler only when it will be operational
Amos Jeffries [Sun, 5 Dec 2010 14:29:27 +0000 (03:29 +1300)] 
Build libprofiler only when it will be operational

The internal CPU profiler requires specific CPU support. It is not useful
to build and link the library unless it is going to work.
Uses AC_PREPROC_IFELSE to allow building on cross-compilers.

13 years agoFreeBSD: fix oid definition clash.
Amos Jeffries [Sun, 5 Dec 2010 13:14:30 +0000 (06:14 -0700)] 
FreeBSD: fix oid definition clash.

Use config.h insted of squid.h in peer_proxy_negotiate_auth.cc to avoid
"oid" type clash between the krb5/gssapi library API and SNMP libray APIs

13 years agoFreeBSD: locate packages under /usr/local
Amos Jeffries [Sun, 5 Dec 2010 12:54:17 +0000 (05:54 -0700)] 
FreeBSD: locate packages under /usr/local

13 years agoFix invalid conversion 'long int' to 'time_t'
Amos Jeffries [Sun, 5 Dec 2010 06:14:11 +0000 (23:14 -0700)] 
Fix invalid conversion 'long int' to 'time_t'

13 years agoUpdate bootstrap internal references to configure.in
Amos Jeffries [Sun, 5 Dec 2010 03:09:54 +0000 (16:09 +1300)] 
Update bootstrap internal references to configure.in

13 years agoRenamve configure.ac to match current autotools standards
Henrik Nordstrom [Sun, 5 Dec 2010 02:25:52 +0000 (03:25 +0100)] 
Renamve configure.ac to match current autotools standards

13 years agoMake bootstrap.sh use system default autotools versions instead of searching
Henrik Nordstrom [Sun, 5 Dec 2010 02:23:25 +0000 (03:23 +0100)] 
Make bootstrap.sh use system default autotools versions instead of searching

can be overridden on commandline if needed. See bootstrap.sh for details.

13 years agoAuthor: Markus Moeller <huaraz@moeller.plus.com>
Amos Jeffries [Sun, 5 Dec 2010 00:25:25 +0000 (17:25 -0700)] 
Author: Markus Moeller <huaraz@moeller.plus.com>
Updated Kerberos header includes

Better heimdal support as new heimdal version have gssapi_krb5 header
files which were in the past only in older MIT releases available.

To use kerberos_ldap_group on freebsd config.test has to be changed as
FreeBSD installs additional packages in /usr/local.

On FreeBSD 7 the krb5.h file does not work with C++. Checks for it.

13 years agoUpdate autoconf to 2.68
Henrik Nordstrom [Sat, 4 Dec 2010 21:35:55 +0000 (22:35 +0100)] 
Update autoconf to 2.68

13 years agoAuthor: Dmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Amos Jeffries [Sat, 4 Dec 2010 13:11:43 +0000 (06:11 -0700)] 
Author: Dmitry Kurochkin <dmitry.kurochkin@measurement-factory.com>
Bug 3099: Incorrect 412 on If-None-Match and If-Modified-Since

13 years agoFix many C/C++ ABI warnings
Amos Jeffries [Sat, 4 Dec 2010 13:10:19 +0000 (06:10 -0700)] 
Fix many C/C++ ABI warnings

13 years agoBug 3068: Actually make SwapDir capacity fields 64-bit.
Amos Jeffries [Sat, 4 Dec 2010 01:41:43 +0000 (18:41 -0700)] 
Bug 3068: Actually make SwapDir capacity fields 64-bit.

This one uses uint64_t instead of size_t. It's a bit wider reaching than
the earlier commit since much of the existing code used size_t.

13 years agoExperiment: file internal extern declaration for C/C++ crossover
Amos Jeffries [Sat, 4 Dec 2010 01:25:10 +0000 (18:25 -0700)] 
Experiment: file internal extern declaration for C/C++ crossover

13 years agoAvoid comm_read "!fd_table[fd].closing()" assertion after adaptation ACL check
Alex Rousskov [Fri, 3 Dec 2010 23:04:01 +0000 (16:04 -0700)] 
Avoid comm_read "!fd_table[fd].closing()" assertion after adaptation ACL check

The assertion was hit if Server fd was closed while we were checking
adaptation ACLs, and we have not been notified of the closure yet (because the
Adaptation::AccessCheck callback is not async while closure notification is).

13 years agoPolished HttpStateData::persistentConnStatus() code. No functionality changes.
Alex Rousskov [Fri, 3 Dec 2010 22:59:37 +0000 (15:59 -0700)] 
Polished HttpStateData::persistentConnStatus() code. No functionality changes.

Moved virginReply() call closer to the first virgin reply use. This will help
re-adding "did we parse the header yet" check if we ever need it again. It
also saves a couple of CPU cycles for some transactions.

13 years agoPolished HttpStateData::persistentConnStatus() code. No functionality changes.
Alex Rousskov [Fri, 3 Dec 2010 22:56:17 +0000 (15:56 -0700)] 
Polished HttpStateData::persistentConnStatus() code. No functionality changes.

Do not check for flags.headers_parsed. The removed check was:
 - misplaced: connection-related conditions such as eof must be checked first;
 - wasteful: we never call persistentConnStatus() unless we parsed headers.

Moreover, calling persistentConnStatus() before we parse headers would trigger
and assertion because the method uses virginReply() which does not exist until
the headers are parsed.

13 years agoFix malloc_statistics C++ linkages
Amos Jeffries [Fri, 3 Dec 2010 04:57:33 +0000 (17:57 +1300)] 
Fix malloc_statistics C++ linkages

13 years agoFixes instance hides CacheManager::instance errors
Amos Jeffries [Fri, 3 Dec 2010 03:38:34 +0000 (16:38 +1300)] 
Fixes instance hides CacheManager::instance errors

13 years agoDocument libcompat-squid overview
Amos Jeffries [Fri, 3 Dec 2010 03:32:41 +0000 (16:32 +1300)] 
Document libcompat-squid overview

13 years agoFix size obscures MemBlob::size warnings.
Amos Jeffries [Fri, 3 Dec 2010 01:56:04 +0000 (14:56 +1300)] 
Fix size obscures MemBlob::size warnings.

13 years agoAuthor: Stefan Fritsch <sf@sfritsch.de>
Alex Rousskov [Thu, 2 Dec 2010 23:33:27 +0000 (16:33 -0700)] 
Author: Stefan Fritsch <sf@sfritsch.de>
Bug 3096: Squid destroys CbDataList<DeferredRead> objects too late

When server download speed exceeds client download speed, Squid creates a
CbDataList<DeferredRead> object and associates a comm_close handler with it.
When the server kicks the deferred read, the comm_close handler is canceled.
This create/cancel sequence happens every time the server-side code wants to
read but has to wait for the client, which may happen hundreds of times per
second.

Before this change, those canceled comm_close handlers were not removed from
Comm until the end of the entire server transaction, possibly accumulating
thousands of CbDataList<DeferredRead> objects tied to the socket descriptor
via the canceled but still stored close handler.

comm_remove_close_handler now immediately removes canceled close handlers to
avoid their accumulation.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 2 Dec 2010 01:12:35 +0000 (18:12 -0700)] 
SourceFormat Enforcement

13 years agoClarify max-size cache_dir option
Henrik Nordstrom [Wed, 1 Dec 2010 08:54:33 +0000 (09:54 +0100)] 
Clarify max-size cache_dir option

13 years agoTry to fix compile problems on FreeBSD6.4
Christos Tsantilas [Wed, 1 Dec 2010 08:41:19 +0000 (10:41 +0200)] 
Try to fix compile problems on FreeBSD6.4

The X509_NAME_add_entry_by_txt on FreeBSD 6.4 declared as:
int X509_NAME_add_entry_by_txt(X509_NAME *,char *,int,unsigned char *,int,int,int);

The second argument declared as "char *".  Use a static char * variable to
avoid compile errors.

13 years agoPrevent "chmod: cannot access btlayer..." errors during build tests.
Alex Rousskov [Mon, 29 Nov 2010 23:12:27 +0000 (16:12 -0700)] 
Prevent "chmod: cannot access btlayer..." errors during build tests.

13 years agoAuthor: Various Translators
Amos Jeffries [Mon, 29 Nov 2010 11:01:34 +0000 (00:01 +1300)] 
Author: Various Translators
Translations Update auto-save

13 years agoPrevent memory leaks when Adaptation::AccessCheck callback ends the job.
Alex Rousskov [Sun, 28 Nov 2010 15:29:51 +0000 (08:29 -0700)] 
Prevent memory leaks when Adaptation::AccessCheck callback ends the job.

The AccessCheckCallbackWrapper is used in nonBlockingCheck() and is called
from the ACL code, using legacy function-based API.  If the job ends during
the callback processing, there are no AsyncCall wrappers to destroy the job
object. We now convert legacy to async call to enable proper wrapping and job
destruction.

These kind of job leaks are invisible to valgrind, but that is another bug.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 28 Nov 2010 01:15:27 +0000 (18:15 -0700)] 
SourceFormat Enforcement

13 years agocache_peer multicast TTL clarification
Amos Jeffries [Sat, 27 Nov 2010 23:15:46 +0000 (12:15 +1300)] 
cache_peer multicast TTL clarification

13 years agoPolicy: use USE_* from code wrappers and ENABLE_* for conditionals.
Amos Jeffries [Sat, 27 Nov 2010 06:44:33 +0000 (23:44 -0700)] 
Policy: use USE_* from code wrappers and ENABLE_* for conditionals.

Makes a few more of the build conditionals match our naming policy.
http://wiki.squid-cache.org/Squid3CodingGuidelines

Updates two code wrapper macros:
* CBDATA_DEBUG becomes USE_CBDATA_DEBUG
* DELAY_POOLS becomes USE_DELAY_POOLS

Updates USE_DELAY_POOLS automake conditional to ENABLE_DELAY_POOLS

TODO: There are more of these wrappers to be updated.

13 years agoRemove useless namespace semi-colons
Amos Jeffries [Sat, 27 Nov 2010 01:58:38 +0000 (18:58 -0700)] 
Remove useless namespace semi-colons

13 years agoSourceLayout: Comm Write cleanups
Amos Jeffries [Sat, 27 Nov 2010 01:46:22 +0000 (18:46 -0700)] 
SourceLayout: Comm Write cleanups

* creates namespace Comm.

* The comm_write() functions are moved into that scope as Comm::Write()
  and only accept AsyncCall now. Old wrapper functions are removed.

* commio_* functions are all moved to methods of a new Comm::IoCallback
  object. Which represents either a read or a write callback event
  waiting to happen. Old wrapper functions have been removed.

* The fdc_table of pending read and write callbacks has been moved into
  the Comm scope with (the name iocb_table) and should be considered private.
  For now the COMMIO_*_CB() macros are retained to produce a pointer to
  a callback object in this table.

* libcomm-listener.la has been renamed to libcomm.la

13 years agoSend HTTP/1.1 on CONNECT responses
Amos Jeffries [Fri, 26 Nov 2010 10:09:52 +0000 (23:09 +1300)] 
Send HTTP/1.1 on CONNECT responses

CONNECT seems to have been missed somehow in the 1.1 conversion.
This corrects the omission so the hard-coded CONNECT reply strings send
1.1 as well.

13 years agoAdded missing namespace to the std::find() call to make Sun's compiler happier.
Alex Rousskov [Fri, 26 Nov 2010 04:51:23 +0000 (21:51 -0700)] 
Added missing namespace to the std::find() call to make Sun's compiler happier.

13 years agoDo not hide Mgr::Forwarder::params name, avoid compiler warnings and confusion.
Alex Rousskov [Fri, 26 Nov 2010 00:13:51 +0000 (17:13 -0700)] 
Do not hide Mgr::Forwarder::params name, avoid compiler warnings and confusion.

13 years agoUse compile-time constant for the array size, to make more compilers happy.
Alex Rousskov [Thu, 25 Nov 2010 22:04:30 +0000 (15:04 -0700)] 
Use compile-time constant for the array size, to make more compilers happy.

13 years agoAuthor: Various Translators
Amos Jeffries [Wed, 24 Nov 2010 11:00:56 +0000 (00:00 +1300)] 
Author: Various Translators
Translations Update auto-save

13 years agoBug 3110: reply_body_max_size none dont work with x-forwarded-for
Amos Jeffries [Tue, 23 Nov 2010 00:32:53 +0000 (13:32 +1300)] 
Bug 3110: reply_body_max_size none dont work with x-forwarded-for

13 years agoUpdate release notes to list %err_code and %err_detail in new logformat codes
Christos Tsantilas [Mon, 22 Nov 2010 11:19:17 +0000 (13:19 +0200)] 
Update release notes to list %err_code and %err_detail in new logformat codes

13 years agoUpdate release notes to include the "Dynamic SSL Certificate Generation" feature
Christos Tsantilas [Mon, 22 Nov 2010 10:55:24 +0000 (12:55 +0200)] 
Update release notes to include the "Dynamic SSL Certificate Generation" feature

13 years agoBug 3059: Crash on digest auth headers with unknown nonce
Amos Jeffries [Mon, 22 Nov 2010 09:52:34 +0000 (22:52 +1300)] 
Bug 3059: Crash on digest auth headers with unknown nonce

13 years agofailure_notify is C++-only
Amos Jeffries [Sun, 21 Nov 2010 11:03:56 +0000 (00:03 +1300)] 
failure_notify is C++-only

The global function failure_notify is tightly type dependent.

This makes sure all code which uses it is C++ and wraps it away from any
situations where the symbol may be re-defined with a C definition.

As a side-effect the malloc tracing code is shuffled into its own file.

13 years agoPolicy enforcement: Remove config.h from .h and .cci files
Amos Jeffries [Sun, 21 Nov 2010 04:40:05 +0000 (21:40 -0700)] 
Policy enforcement: Remove config.h from .h and .cci files

13 years agoPolicy: Include config.h first in all .cc
Amos Jeffries [Sat, 20 Nov 2010 11:31:38 +0000 (04:31 -0700)] 
Policy: Include config.h first in all .cc

Also fixes a few unsafe function uses hidden by earlier lack of these
includes safety checks.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 20 Nov 2010 01:12:28 +0000 (18:12 -0700)] 
SourceFormat Enforcement

13 years agoFix cachemgr http_port config report hiding options
Amos Jeffries [Fri, 19 Nov 2010 12:04:58 +0000 (01:04 +1300)] 
Fix cachemgr http_port config report hiding options

13 years agotestHttpReply requires hash containers
Amos Jeffries [Fri, 19 Nov 2010 11:18:54 +0000 (00:18 +1300)] 
testHttpReply requires hash containers

13 years agoHTTP Compliance: do not forward TRACE with Max-Forwards: 0 after REQMOD
Alex Rousskov [Fri, 19 Nov 2010 02:10:21 +0000 (19:10 -0700)] 
HTTP Compliance: do not forward TRACE with Max-Forwards: 0 after REQMOD

Before the change, Max-Forwards request value was cached in
HttpRequest::max_forwards member. It was set once in
clientProcessRequest() function. This works fine as long as no request
adaptation is performed. Otherwise original HTTP request may be
replaced with adopted one in ClientHttpRequest::noteAdaptationAnswer()
method and max_forwards value is lost.

This change removes HttpRequest::max_forwards member and gets the value
directly from HttpHeader when needed. This adds another string-to-int
conversion for TRACE and OPTIONS requests, but those are rare, and we
save a little in the other, far more common cases by removing the
HttpRequest::max_forwards member.

Removed assertion from clientReplyContext::traceReply() since it is
called from a single place and the condition is checked right before
the call.

Co-Advisors test cases:
    test_case/rfc2616/maxForwardsZero-TRACE-asterisk
    test_case/rfc2616/maxForwardsZero-TRACE-absolute

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 19 Nov 2010 01:12:35 +0000 (18:12 -0700)] 
SourceFormat Enforcement

13 years agoMinor changes to allow squid compile with ssl enabled but ssl_crtd disabled
Christos Tsantilas [Thu, 18 Nov 2010 08:37:39 +0000 (10:37 +0200)] 
Minor changes to allow squid compile with ssl enabled but ssl_crtd disabled

13 years agorename ssl/ssl_support.cc -> ssl/support.cc and ssl/ssl_support.h to ssl/support.h
Christos Tsantilas [Thu, 18 Nov 2010 08:16:57 +0000 (10:16 +0200)] 
rename ssl/ssl_support.cc -> ssl/support.cc  and ssl/ssl_support.h to ssl/support.h

13 years agoAuthor: Alex Rousskov, Andrew Balabohin, Christos Tsantilas
Christos Tsantilas [Thu, 18 Nov 2010 08:01:53 +0000 (10:01 +0200)] 
Author: Alex Rousskov, Andrew Balabohin, Christos Tsantilas
Dynamic SSL certificate generartion

This patch implements dynamic SSL certificate generartion in Squid.When
used with SSL Bump, the feature allows Squid to dynamically
generate (using a configurable CA certificate) and cache SSL
certificates for the proxied hosts.

A description for this feature can be found at:
   http://wiki.squid-cache.org/Features/DynamicSslCert

A first version of the patch posted by Alex, some months before:
  http://www.squid-cache.org/mail-archive/squid-dev/201003/0201.html

Some words about the patch:

  * ssl related source files moved under the src/ssl directory

  * Introduce the TidyPointer class similar to std::auto_ptr, which implements
    a  pointer that deletes the object it points to when the pointer's owner
    or context is gone. It  is designed to avoid memory leaks  in the presence
    of exceptions and processing short cuts.

  * Implements ssl context cache to use with generated ssl contexts. The
    Ssl::LocalContextStorage class stores the hostname/ssl context pairs for
    a local listening address/port. The  Ssl::GlobalContextStorage class used
    to store Ssl::LocalContextStorages per local listening address and handles
    squid shutdown/configure/reconfigure

  * Ssl::Helper class implements the squid part of the ssl_crtd helpers.

  * The ssl_crtd helper implemented in ssl_crtd.cc and certificate_db.* files

  * The Ssl::CertificateDb class (certificate_db.* files)  implements  a
    database of certificates on disk files. It is used by ssl_crtd helper to
    manipulate generated certificates.

  * The ssl related files included in the libraries libsslutil.a which
    contains common classes and functions and the libsquidssl.a which has
    squid related ssl objects and functions

  * Use the Ssl namespace for new ssl code

This is a Measurement Factory Project.

13 years agoAuthor: Various Translators
Amos Jeffries [Wed, 17 Nov 2010 23:01:38 +0000 (12:01 +1300)] 
Author: Various Translators
Translations Update auto-save