]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 years agoRemoved copyright statements from SBuf code, pending project policy
Francesco Chemolli [Fri, 4 Oct 2013 13:55:21 +0000 (15:55 +0200)] 
Removed copyright statements from SBuf code, pending project policy
Made SBuf::size_type unsigned and adjusted tests accordingly
Add documentation for SBuf::spaceSize

11 years agoMerged from trunk
Francesco Chemolli [Fri, 4 Oct 2013 13:02:57 +0000 (15:02 +0200)] 
Merged from trunk

11 years agoRevert libresolv related changed of rev.13026
Amos Jeffries [Fri, 4 Oct 2013 12:15:52 +0000 (06:15 -0600)] 
Revert libresolv related changed of rev.13026

This library API and hacks are still used by the Kerberos LDAP group
helper for a custom SRV lookup.

11 years agoMerged from trunk
Francesco Chemolli [Thu, 3 Oct 2013 19:07:33 +0000 (21:07 +0200)] 
Merged from trunk

11 years agoMore ~pPrep for 3.4.0.2
Amos Jeffries [Thu, 3 Oct 2013 12:30:26 +0000 (06:30 -0600)] 
More ~pPrep for 3.4.0.2

11 years agoPrep for 3.4.0.2
Amos Jeffries [Thu, 3 Oct 2013 12:17:18 +0000 (06:17 -0600)] 
Prep for 3.4.0.2

11 years agoAdd --disable-arch-native build option
Amos Jeffries [Wed, 2 Oct 2013 12:21:20 +0000 (06:21 -0600)] 
Add --disable-arch-native build option

The -march-native option is required by Clang 3.2 on some CPU
and produces better optimization in binaries by GCC.
But building inside a virtual machine environment has been found to
cause random Illegal Instruction errors due to mis-detection of CPU.

This option is added to permit selective disabling of teh preferred
default (which is to use the compiler flag when available).

11 years agoFix line wrapping broken in rev.13027
Amos Jeffries [Wed, 2 Oct 2013 09:51:09 +0000 (03:51 -0600)] 
Fix line wrapping broken in rev.13027

11 years agoFix some missing parts from 13015
Amos Jeffries [Wed, 2 Oct 2013 09:06:03 +0000 (03:06 -0600)] 
Fix some missing parts from 13015

The %LOGIN format code makes the regressino testign fail minimal builds
where auth is disabled.

The test-suite configuration tests need to be distributed to allow
make check to operate outside a repository checkout.

11 years agoFix build errors in rev.13012
Amos Jeffries [Wed, 2 Oct 2013 03:41:06 +0000 (21:41 -0600)] 
Fix build errors in rev.13012

static functions defined in headers (.h) must be used in all .cc which
include them. Functions which are not always used must be defined as
inline instead.

This resolves warning: 'const char* LogTime()' defined but not used

11 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 2 Oct 2013 00:12:54 +0000 (18:12 -0600)] 
SourceFormat Enforcement

11 years agoRemove dnsserver and external DNS helper API
Amos Jeffries [Tue, 1 Oct 2013 23:21:17 +0000 (17:21 -0600)] 
Remove dnsserver and external DNS helper API

The external DNS helper API places limits on Squid DNS lookups per second
low enough to noticably affect the HTTP requests per second which can be
served.

Request for comments about proposed removal 2 years ago produced feedback
stating that the helper was needed for local name resolution. This is
now available since 3.4 mDNS extensions.

A more recent request for reasons for keeping the helper API have
produced only two responses over the period of several months. Both
indicating that the API is no longer necessary for the business cases of
a year or so ago.

As such and because the helper fails to operate sufficiently on several
major operating systems and the API is difficult to maintain it is being
removed as of Squid-3.5.

11 years agoRemove COSS
Amos Jeffries [Mon, 30 Sep 2013 12:30:50 +0000 (06:30 -0600)] 
Remove COSS

This storage type has been superceded by Rock storage since 3.2.

11 years agoPolish: better WARNING when workers directive is ignore on reconfigure.
Amos Jeffries [Mon, 30 Sep 2013 07:22:17 +0000 (01:22 -0600)] 
Polish: better WARNING when workers directive is ignore on reconfigure.

Changing the workers directive requires a proxy restart, not just a
reconfigure. State this clearly in the warning message.

11 years agoTests: Add regression tests for squid.conf parser
Amos Jeffries [Mon, 30 Sep 2013 07:04:36 +0000 (01:04 -0600)] 
Tests: Add regression tests for squid.conf parser

Regressions identified by the community in active production configs
with the 3.4.0.1 parser upgrade attempt.

Also, disables %macro detection inside quoted-strings. Which is still
encountering errors in the current 3.HEAD code.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 30 Sep 2013 00:14:45 +0000 (18:14 -0600)] 
SourceFormat Enforcement

11 years agoFix various header build issues in librfcnb
Amos Jeffries [Sun, 29 Sep 2013 20:14:10 +0000 (14:14 -0600)] 
Fix various header build issues in librfcnb

Highlighted when the #include sorting was applied to lib/rfcnb/ files
several of the headers were using order-dependent definitions and were
not wrapped with sfety macros.

11 years agoChinese language dialect updates
Amos Jeffries [Sun, 29 Sep 2013 18:37:10 +0000 (06:37 +1200)] 
Chinese language dialect updates

Perform the long overdue renaming of zh-cn.po an zh-tw.po to Hans and
Hant alphabet files. Add aliases for the 2 and 3 code dialect tags which
are appearing in Asian traffic.

11 years agoFix various compile errors in rev.13012
Amos Jeffries [Sat, 28 Sep 2013 15:19:53 +0000 (03:19 +1200)] 
Fix various compile errors in rev.13012

Uncovered by GCC 4.8 and Squid Project build farm testing.

11 years agoAdd missing integration of squid.conf test with Unit-Test PASS/FAIL results
Amos Jeffries [Sat, 28 Sep 2013 09:14:43 +0000 (03:14 -0600)] 
Add missing integration of squid.conf test with Unit-Test PASS/FAIL results

11 years agoAutomated squid.conf parser testing with squid -k parse
Amos Jeffries [Sat, 28 Sep 2013 09:01:23 +0000 (03:01 -0600)] 
Automated squid.conf parser testing with squid -k parse

This make the build process testing run 'squid -k parse' with a series
of test configuration files to exercise edge cases and backward
compatibility.

The default squid.conf which is to be installed on new systems is always
tested.

Other config files with unit tests can be dropped into
test-suite/squidconf/ and will be parse tested automatically.

11 years agotypo in rev.13013
Amos Jeffries [Fri, 27 Sep 2013 16:14:40 +0000 (10:14 -0600)] 
typo in rev.13013

11 years agoPortability: cleanup includes for sys/time.h and sys/resource.h
Amos Jeffries [Fri, 27 Sep 2013 16:06:15 +0000 (10:06 -0600)] 
Portability: cleanup includes for sys/time.h and sys/resource.h

These two include files are order-dependent on several operating systems
and as such are provided by Squid libcompat headers. There is no need for
code to include them specially and several HAVE_SYS_TIME_H macros were
missing which breaks the build on systems where the file is missing.

11 years agonegotiate_kerberos_auth: upgrade to present group= keys
Markus Moeller [Fri, 27 Sep 2013 15:21:54 +0000 (09:21 -0600)] 
negotiate_kerberos_auth: upgrade to present group= keys

Use the new kv-pair protocol extensions for emitting group details
directly at the time of authentication. group=X key-value pair is
used to emit the Kerberos SIDS values presented by MS Active
Directory environments.

Also, update the Hiemdal library support for recent library versions.

Also, polish the Kerberos and LDAP Group related code to avoid memory
leaks and improve C++ coding style.

11 years agoUse IPv6 localhost nameserver on DNS configuration errors
Amos Jeffries [Tue, 24 Sep 2013 14:19:08 +0000 (08:19 -0600)] 
Use IPv6 localhost nameserver on DNS configuration errors

When DNS configuration fails to locate a set of nameservers "localhost"
is used as the default but has previously only been setting 127.0.0.1
IPv4 address for localhost. This enables the failover to work as designed
on IPv6-only networks.

11 years agoBug 3914: partial: make squidclient tool build cleanly with -Wconversion
Amos Jeffries [Sat, 21 Sep 2013 17:21:48 +0000 (05:21 +1200)] 
Bug 3914: partial: make squidclient tool build cleanly with -Wconversion

11 years agoBug 3923: cbdata and undefined behavior due to dynamic runtime enumeration
'noloader' [Sat, 21 Sep 2013 14:19:37 +0000 (02:19 +1200)] 
Bug 3923: cbdata and undefined behavior due to dynamic runtime enumeration

11 years agoBug 3918: Squid 3.3.9 Self Test Failures on Mac OS X 10.8
Alex Rousskov [Sat, 21 Sep 2013 12:33:29 +0000 (00:33 +1200)] 
Bug 3918: Squid 3.3.9 Self Test Failures on Mac OS X 10.8

11 years agoBug 3929: request_header_add not working for tunnel requests
libit [Sat, 21 Sep 2013 12:23:23 +0000 (00:23 +1200)] 
Bug 3929: request_header_add not working for tunnel requests

11 years agoFix typo in rev.13004
Amos Jeffries [Sat, 21 Sep 2013 12:13:36 +0000 (00:13 +1200)] 
Fix typo in rev.13004

11 years agoPolish: report bytes received when bad content-length detected by quick-abort
Amos Jeffries [Fri, 20 Sep 2013 02:41:05 +0000 (14:41 +1200)] 
Polish: report bytes received when bad content-length detected by quick-abort

11 years agoFixed documentation, tentative alternate dump implementation with Raw api
Francesco Chemolli [Thu, 19 Sep 2013 12:38:58 +0000 (14:38 +0200)] 
Fixed documentation, tentative alternate dump implementation with Raw api
Improve SBuf::find readability
Improved readability and error reporting in SBuf
Fixed nonfatal bug in snprintf behavior detection

11 years agoFix pinning hierarchy log information
Amos Jeffries [Wed, 11 Sep 2013 11:33:20 +0000 (05:33 -0600)] 
Fix pinning hierarchy log information

11 years agoPrep for 3.3.9
Amos Jeffries [Wed, 11 Sep 2013 01:31:14 +0000 (19:31 -0600)] 
Prep for 3.3.9

11 years agoWindows: locate CMSG definitions in Winsock2.h when present
Amos Jeffries [Sun, 8 Sep 2013 22:26:49 +0000 (16:26 -0600)] 
Windows: locate CMSG definitions in Winsock2.h when present

Windows defines the CMSG macros in Winsock2.h sometimes. This allows the
definitions there to be used when present and avoids compiler errors
about double definitions.

  This is an iCelero project.

11 years agoBug 3849: Duplicate certificate sent when using https_port
Christos Tsantilas [Sun, 8 Sep 2013 10:48:51 +0000 (13:48 +0300)] 
Bug 3849: Duplicate certificate sent when using https_port

The certificate file given with the "cert=" option it may contain a list of
certificates to be chained to the SSL client, for example intermediate
certificates.
The bug caused because in the certificates  chain we are storing also the
certificate of the port. This is works well for SSL-bump because squid
generates a certificate which uses the port certificate as CA certificate.
But in the case of https_port without bumping the port certificate is sent
twice, one as SSL server certificate and one as chained certificate.

This patch try to chain port certificate only when the sslbump is used.

This is a Measurement Factory project

11 years agoFix myportname ACL on ICAP/eCAP transactions
Amos Jeffries [Sun, 8 Sep 2013 04:27:31 +0000 (22:27 -0600)] 
Fix myportname ACL on ICAP/eCAP transactions

The port name from http_port/https_port was not being propigated to
adapted reqeusts after ICAP/eCAP. Which makes the myportname ACL and
logging of portname not work on adapted requests.

 This is an iCelero Project

11 years agoDocs: Update SPONSORS listing
Amos Jeffries [Sun, 8 Sep 2013 04:02:54 +0000 (22:02 -0600)] 
Docs: Update SPONSORS listing

11 years agoWindows: document the purpose and use of Squid namespace wrappers
Amos Jeffries [Sun, 8 Sep 2013 03:17:25 +0000 (21:17 -0600)] 
Windows: document the purpose and use of Squid namespace wrappers

Also, add some missing #define's

  This is an iCelero project

11 years agoWindows: fix IPv6 split-stack support
Amos Jeffries [Sun, 8 Sep 2013 03:07:29 +0000 (21:07 -0600)] 
Windows: fix IPv6 split-stack support

Some builds of MinGW do not define IPV6_V6ONLY socket option.

  This is an iCelero project

11 years agoWindows: fix collision between POSIX wrappers and DiskIO class methods
Amos Jeffries [Tue, 3 Sep 2013 09:05:02 +0000 (21:05 +1200)] 
Windows: fix collision between POSIX wrappers and DiskIO class methods

The POSIX function shutdown() is #define'd on Windows. This causes
compiler issues with the DiskIO method of same name. Rename the method
to gracefulShutdown() instead.

Also, Bug 3189 was incomplete and missed a change to DiskThreads
Windows initialization method.

  This is an iCelero project.

11 years agoRegression fix: revert rev.12815 MinGW C++11 support
Amos Jeffries [Tue, 3 Sep 2013 00:16:54 +0000 (12:16 +1200)] 
Regression fix: revert rev.12815 MinGW C++11 support

MinGW supports c++11 but in ANSI-strict way. Squid code still contains
non-standard strcasecmp strncasecmp and possibly other functions.

  This is a iCelero Project.

11 years agoPolish: typo in debug for SSL-bumping
John Xue [Mon, 2 Sep 2013 04:17:48 +0000 (22:17 -0600)] 
Polish: typo in debug for SSL-bumping

11 years agoFix configuration file parsing bugs, related to quoted strings
Christos Tsantilas [Thu, 29 Aug 2013 10:22:43 +0000 (13:22 +0300)] 
Fix configuration file parsing bugs, related to quoted strings

Try to fix 'comparison between signed and unsigned integer expression' compiler
warning.

11 years agoFix configuration file parsing bugs, related to quoted strings
Christos Tsantilas [Thu, 29 Aug 2013 09:21:53 +0000 (12:21 +0300)] 
Fix configuration file parsing bugs, related to quoted strings

This is patch try to fix problems discussed under the "[PATCH] Unknown cfg function"
mail thread on squid-dev mailing list

Fixes/changes:
 - The quoted tokens mode (configuration_includes_quoted_values parameter)
   is  set to off by default

 - If configuration_includes_quoted_values is off the quoted tokens
   parsed using the ConfigParser::NextToken include the quotes, to keep
   compatibility with older releases.

 - The methods ConfigParser::RegexPattern() and ConfigParser::RegexStrtokFile()
   added to parse regex tokens. The regex tokens can not be quoted values but
   have their own syntax.

 - For the cases where quoted strings are required (wordlists, Notes
   parsing, Headers with acl), the new ConfigParser::NextQuotedToken method
   added.
   The old wordlists parser allowed escaping any character, this patch
   will return an error if you try to escape alphanumeric characters. The
   \r \n and \t have the C semantics.

 - Removes the ConfigParser::TokenUndo method. The new method
   ConfigParser::NextTokenPreview() which can be used to preview the next
   token is added. This method if the next token is invalid (eg unquoted
   with special characters) instead of calling self_destruct it will return
   the "[invalid token]" as token.

 - A set of new flags defined under ConfigParser class to define the type of
   parsing: ParseRegex_ (next token is regex)  ParseQuotedOrToEOL_
   (next token is quoted or to-EOL), PreviewMode_ (just do preview do not
   pop next token)

 - Currently parser read a line, and the tokens stored on this line
   and the line modified while parsed.
   This patch extracts the tokens from line and store them to
   ConfigParser::CfgLineTokens_ member. This method selected because
     1) We may need to parse again the line so we do not want to modify it.
        For example call the ConfigParser::PeekAtToken method to check if it
        is a flag token ( eg "-i"), and if not call the
        ConfigParser::RegexPattern() method to read next regex expression.
     2) The current line tokens must stored somewhere to support the following:
        char *name = ConfigParser::NextToken();
        char *value = ConfigParser::NextToken();
   The ConfigParser::CfgLineTokens_ reset when a new config line is read.

TODO:
 - The ConfigParser::TokenPutBack method probably should removed in the future
   together with the ConfigParser::Undo_ and ConfigParser::Undo().
   This method is currently used only in one place (acl regex).

11 years agoDocs: fix doxygen page generation
Amos Jeffries [Mon, 26 Aug 2013 11:14:58 +0000 (05:14 -0600)] 
Docs: fix doxygen page generation

11 years agoWindows: fix getopt.c build error with MinGW
Amos Jeffries [Mon, 26 Aug 2013 10:01:53 +0000 (04:01 -0600)] 
Windows: fix getopt.c build error with MinGW

Resolve warning 'initialization discards const qualifieer from pointer'.

  This is an iCelero project.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 26 Aug 2013 00:12:21 +0000 (18:12 -0600)] 
SourceFormat Enforcement

11 years agoImproved compatibility with clang and icc
Francesco Chemolli [Sun, 25 Aug 2013 06:36:13 +0000 (08:36 +0200)] 
Improved compatibility with clang and icc

11 years agoDoce: make doc/Programming-Guide/doxygen.footer.dyn non-empty
Amos Jeffries [Sun, 25 Aug 2013 04:44:20 +0000 (22:44 -0600)] 
Doce: make doc/Programming-Guide/doxygen.footer.dyn non-empty

Experiment to see if the .dyn file footer output by doxygen is still
placed if this file contains whitespace. Just having it empty no longer
seems to work with the newer doxygen version.

11 years agoDocs: define use of footer for output DYN files.
Amos Jeffries [Sat, 24 Aug 2013 13:12:26 +0000 (01:12 +1200)] 
Docs: define use of footer for output DYN files.

doc/Programming-Guide/doxygen.footer.dyn is an empty file because we do
not need anythign as a footer. But we do need to use it because doing so
will suppress teh default "</body></html>" string being appended to the
output file, which breaks out static site generation since .dyn files
have our own squid-cache.org footers automatically appended.

11 years agoBug 3895: fix acl_uses_indirect_client and cache_peer_access
David Isaacs [Sat, 24 Aug 2013 06:24:07 +0000 (00:24 -0600)] 
Bug 3895: fix acl_uses_indirect_client and cache_peer_access

11 years agoClose idle client connections associated with closed idle pinned connections.
Alex Rousskov [Thu, 22 Aug 2013 18:39:41 +0000 (12:39 -0600)] 
Close idle client connections associated with closed idle pinned connections.

Squid was not monitoring idle persistent connections pinned to servers. Squid
would discover that the pinned server connection is closed only after
receiving a new request on the idle client connection and trying to write that
request to the server. In such cases, Squid propagates the pinned connection
closure to the client (as it should).

Chrome and, to a lesser extent, Firefox handle such races by opening a new
connection and resending the failed [idempotent] request transparently to the
user. However, IE usually displays an error page to the user.

While some pconn races cannot be avoided, without monitoring idle pconns,
Squid virtually guaranteed such a race in environments where origin server
idle connection timeout is smaller than client/Squid timeouts and users
are revisiting pages in the window between those two timeouts.

Squid now monitors idle pinned connections similar to idle connections in the
pconn pool and closes the corresponding idle client connection to keep the two
sides in sync (to the extent possible).

It is theoretically possible that this change will break servers that send
whitespace on an idle persistent connection or perhaps send some SSL keepalive
traffic. No such cases are known to exist though.

11 years agoWindows: Fix ConnOpener::sleep() collision with global macro
Amos Jeffries [Wed, 21 Aug 2013 11:26:14 +0000 (05:26 -0600)] 
Windows: Fix ConnOpener::sleep() collision with global macro

Squid compat library defines sleep() as a wrapper macro which
collides with the member definition in Comm::ConnOpener.

 This is an iCelero project

11 years agoUpdate forward_max_tries to permit 25 server paths
Amos Jeffries [Wed, 21 Aug 2013 08:43:27 +0000 (02:43 -0600)] 
Update forward_max_tries to permit 25 server paths

With cloud sites becoming more popular more CDN servers are producing
long lists of IPv6 and IPv4 addresses. If there are not enough paths
selected the IPv4 ones may never be reached.

11 years agoShow number of available filedescriptors when reserved FD changes
Amos Jeffries [Wed, 21 Aug 2013 07:48:00 +0000 (01:48 -0600)] 
Show number of available filedescriptors when reserved FD changes

11 years agoRegression Bug 3077: off-by-one error in Digest header decoding
Jan Sievers [Thu, 15 Aug 2013 21:28:14 +0000 (15:28 -0600)] 
Regression Bug 3077: off-by-one error in Digest header decoding

This is a regression in the 3.2 and later version of the original bug
fix patch.

The effect is that all attributes are treated as quoted-string values
with unescaping performed. This ends with credentials wrongly being
rejected as invalid.

11 years agoEnsure that the SQUID_BUILD_INFO macro is always defined
Francesco Chemolli [Mon, 12 Aug 2013 16:53:56 +0000 (18:53 +0200)] 
Ensure that the SQUID_BUILD_INFO macro is always defined

11 years agoDisplay Build-Info in cache manager info report
Amos Jeffries [Fri, 9 Aug 2013 03:06:52 +0000 (21:06 -0600)] 
Display Build-Info in cache manager info report

This info can be quite useful for tracking which patched build of Squid
is being used to produce the report.

11 years agoRegister Http2-Settings header
Amos Jeffries [Wed, 7 Aug 2013 03:18:08 +0000 (15:18 +1200)] 
Register Http2-Settings header

This header ia a hop-by-hop request-only header and requires stripping
by intermediaries which do not support HTTP/2.0 in Upgrade feature.

We register it now to ensure the stripping occurs even if broken clients
omit it from the Connection header list.

11 years agoFix configure parsing IP/domain directives
Amos Jeffries [Sat, 3 Aug 2013 07:57:44 +0000 (19:57 +1200)] 
Fix configure parsing IP/domain directives

Squid would semi-silently accept invalid IP address or hostname in some
directives which required them (eg wccp_router) and use the magic
IP_ANYADDR value. This change makes configure halt with a FATAL error
instead.

 Detected by Coverity Scan. Issue 1057286.

11 years agoPolish: handle NTLM helper returning OK without user= value
Amos Jeffries [Sat, 3 Aug 2013 07:23:53 +0000 (19:23 +1200)] 
Polish: handle NTLM helper returning OK without user= value

Prevent crash by treating this case as an error and failed authentication

  Detected by Coverity Scan. Issue 1020656.

11 years agoFix typo in rev.12972
Amos Jeffries [Sat, 3 Aug 2013 06:16:46 +0000 (18:16 +1200)] 
Fix typo in rev.12972

11 years agoFix memory leak in refresh_pattern parsing
Amos Jeffries [Sat, 3 Aug 2013 04:24:06 +0000 (16:24 +1200)] 
Fix memory leak in refresh_pattern parsing

Occurs when refresh_pattern is configure with invalid regex pattern.

 Detected by Coverity Scan. Issue 1058882.

11 years agoCleanup: initialize all member of AnyP::PortCfg
Amos Jeffries [Sat, 3 Aug 2013 04:15:04 +0000 (16:15 +1200)] 
Cleanup: initialize all member of AnyP::PortCfg

  Detected by Coverity Scan. Issue 1058883.

11 years agoAdd dns_multicast_local to control mDNS operation
Amos Jeffries [Thu, 1 Aug 2013 20:45:56 +0000 (08:45 +1200)] 
Add dns_multicast_local to control mDNS operation

Enable admin control over whether mDNS operates or not. Set the default
to OFF due to .arpa reverse-DNS requests causing a rise in traffic from
this feature even on networks without mDNS responders setup.

Also, polish cachemgr idns report to show for queued queries which
resolver type and query the entry is involving. mDNS can cause a queue
to exist as some lookups timeout on the mDNS resolvers.

11 years agoImproved checks on SBuf::*Size methods
Francesco Chemolli [Thu, 1 Aug 2013 09:07:53 +0000 (11:07 +0200)] 
Improved checks on SBuf::*Size methods
Improved detection of vsnprintf's not-well-defined behavior.

11 years agoTightened size checks in reserveSpace, reserveCapacity and rawSpace
Francesco Chemolli [Wed, 31 Jul 2013 16:11:54 +0000 (18:11 +0200)] 
Tightened size checks in reserveSpace, reserveCapacity and rawSpace

11 years agoImproved SBuf::appendf() readability and correctness.
Francesco Chemolli [Wed, 31 Jul 2013 12:17:23 +0000 (14:17 +0200)] 
Improved SBuf::appendf() readability and correctness.
Clarified documentation.
Added SBuf::spaceSize()
Fixed display result in appendf() unit test.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 31 Jul 2013 00:13:04 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agoSync with newest OpenSSL error codes
Christos Tsantilas [Tue, 30 Jul 2013 15:19:27 +0000 (18:19 +0300)] 
Sync with newest OpenSSL error codes

This patch updates Squid list of errors to handle the ones available in newer
OpenSSL versions.

This is a Measurement Factory project

11 years agoSpecialize SBuf::reserveSpace and reserveCapacity functions to provide guarantee...
Francesco Chemolli [Tue, 30 Jul 2013 09:43:24 +0000 (11:43 +0200)] 
Specialize SBuf::reserveSpace and reserveCapacity functions to provide guarantee of single store ownership.
Tune SBuf::rawSpace() to take over from reserve* for the optimization role preveiously played by reserve*.
Adjust documentation and callers.

11 years agoFix debugs when refresh_pattern is missing the regex pattern
Amos Jeffries [Tue, 30 Jul 2013 00:44:04 +0000 (18:44 -0600)] 
Fix debugs when refresh_pattern is missing the regex pattern

This is a very rare situation and may not be completely required. But it
did hinder debugging of refresh_pattern when the regex field token was
broken by parser updates.

11 years agoFix 'ERROR: A percentage value is missing.'
Amos Jeffries [Mon, 29 Jul 2013 17:34:48 +0000 (11:34 -0600)] 
Fix 'ERROR: A percentage value is missing.'

This usage of strtok() appears to have been omitted from rev.12949

11 years agoPrep for 3.4.0.1
Amos Jeffries [Sun, 28 Jul 2013 22:25:20 +0000 (16:25 -0600)] 
Prep for 3.4.0.1

11 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 28 Jul 2013 00:12:51 +0000 (18:12 -0600)] 
SourceFormat Enforcement

11 years agoHandle infinite certificate validation loops caused by OpenSSL bug #3090.
Christos Tsantilas [Sat, 27 Jul 2013 13:37:29 +0000 (16:37 +0300)] 
Handle infinite certificate validation loops caused by OpenSSL bug #3090.

If OpenSSL is stuck in a validation loop, Squid breaks the loop and triggers a
new custom SQUID_X509_V_ERR_INFINITE_VALIDATION SSL validation error. That
error cannot be bypassed using sslproxy_cert_error because to break the loop
Squid has to tell OpenSSL that the certificate is invalid, which terminates
the SSL connection.

Validation loops exceeding SQUID_CERT_VALIDATION_ITERATION_MAX iterations
are deemed infinite. That macro is defined to be 16384, but that default can
be overwritten using CPPFLAGS.

This is a Measurement Factory project

11 years agoDecoupled reserveCapacity from reserveSpace.
Francesco Chemolli [Fri, 26 Jul 2013 15:28:41 +0000 (17:28 +0200)] 
Decoupled reserveCapacity from reserveSpace.

11 years agoMerged from trunk
Francesco Chemolli [Fri, 26 Jul 2013 12:49:53 +0000 (14:49 +0200)] 
Merged from trunk

11 years agoFix missing bits of rev.12961
Amos Jeffries [Fri, 26 Jul 2013 11:26:04 +0000 (05:26 -0600)] 
Fix missing bits of rev.12961

11 years agoTied more closely SBuf and MemBlob size_type
Francesco Chemolli [Fri, 26 Jul 2013 09:20:09 +0000 (11:20 +0200)] 
Tied more closely SBuf and MemBlob size_type
Better compliance with standards
Improved SBuf documentation
Improved adherence to std::string method signatures
Improved \0-cleanliness
Removed some methods taking std::string arguments to avoid double data copies,
  documented alternate patterns
Implemented cmp and caseCmp shortcuts
Cleaned-up some methods' implementations after Alex Rousskov's suggestions
Improved unit tests' cleanliness by making more effective use of cppunit macros
Implemented more unit tests, better coverage for \0-cleanliness

11 years agoDocs: Update http(s)_port protocol= details
Amos Jeffries [Fri, 26 Jul 2013 05:21:29 +0000 (23:21 -0600)] 
Docs: Update http(s)_port protocol= details

11 years agoUpdate the http(s)_port directives protocol= parameter
Amos Jeffries [Fri, 26 Jul 2013 02:06:25 +0000 (20:06 -0600)] 
Update the http(s)_port directives protocol= parameter

... to use AnyP::ProtocolVersion for internal storage instead of opaque
string text.

This both limits the possible parameter values to one of HTTP, HTTP/1.1,
HTTPS or HTTPS/1.1 and ensures that URLs generated from that protocol
parameter value are http:// and https:// URL.
Other values will cause Squid to abort.

11 years agoRelease Notes: fix typo in ./configure options
Amos Jeffries [Thu, 25 Jul 2013 13:59:35 +0000 (07:59 -0600)] 
Release Notes: fix typo in ./configure options

11 years agoMake GCC 4.8 happy with libip code
Amos Jeffries [Thu, 25 Jul 2013 13:06:58 +0000 (07:06 -0600)] 
Make GCC 4.8 happy with libip code

Invalid casting seems to confuse the ABI generator and results in
illegal instruction faults when the unit tests is run.
The class API is already const-correct so there is no need for the cast
to occur, and it should not be done on a non-pointer type anyway.

Also, fixes a missing "struct" type identifier found along the way.

11 years agoFix assert with side effects in ServerStateData::handleAdaptedHeader
Nathan Hoad [Thu, 25 Jul 2013 07:21:54 +0000 (01:21 -0600)] 
Fix assert with side effects in ServerStateData::handleAdaptedHeader

setConsumerIfNotLate conditionally schedules some async calls, so the
call definitely shouldn't be removed by the precompiler.

11 years agoFix mgr:info report 'Largest file desc currently in use' with SMP
Amos Jeffries [Thu, 25 Jul 2013 03:42:06 +0000 (21:42 -0600)] 
Fix mgr:info report 'Largest file desc currently in use' with SMP

The biggest FD in use should not be the sum of biggest FD in each worker,
but the maximum across all workers.

11 years agoMerged from trunk
Francesco Chemolli [Wed, 24 Jul 2013 16:14:23 +0000 (18:14 +0200)] 
Merged from trunk

11 years agoBranch 3.4.0.0 and disable snapshots 3.1 and 3.2
Automatic source maintenance [Mon, 22 Jul 2013 09:22:09 +0000 (03:22 -0600)] 
Branch 3.4.0.0 and disable snapshots 3.1 and 3.2

11 years agoRelease Notes: fix typo
Amos Jeffries [Mon, 22 Jul 2013 05:15:37 +0000 (23:15 -0600)] 
Release Notes: fix typo

11 years agoRelease notes for multicast DNS support
Amos Jeffries [Mon, 22 Jul 2013 02:13:50 +0000 (20:13 -0600)] 
Release notes for multicast DNS support

11 years agoRelease notes for rev.12945
Amos Jeffries [Mon, 22 Jul 2013 01:57:39 +0000 (19:57 -0600)] 
Release notes for rev.12945

11 years agoFix return value of ConfigParser::strtokFile()
Amos Jeffries [Mon, 22 Jul 2013 01:26:09 +0000 (19:26 -0600)] 
Fix return value of ConfigParser::strtokFile()

11 years agoRelease Notes: document squid.conf quoting changes
Amos Jeffries [Sun, 21 Jul 2013 23:23:13 +0000 (17:23 -0600)] 
Release Notes: document squid.conf quoting changes

11 years agoRelease Notes: update squid.conf directive status
Amos Jeffries [Sun, 21 Jul 2013 23:02:09 +0000 (17:02 -0600)] 
Release Notes: update squid.conf directive status

11 years agoQuoted values in squid.conf
Christos Tsantilas [Sun, 21 Jul 2013 19:24:35 +0000 (22:24 +0300)] 
Quoted values in squid.conf

This patch :
  - adds support for quoted values in the entire squid.conf
  - warn about or prohibit values that can no longer be interpreted as
    either quoted strings or simple tokens
  - support parameters("/path/to/file.name") syntax to load external
    configuration files
  - Checks if macros allowed in "double quoted" values.
  - replaces the strtok() calls with calls to the new ConfigParser::NextToken()
  - modify strtokFile to use new ConfigParser::NextToken()
  - Add the new configuration_includes_quoted_values configuration option, to
    control the squid parser behaviour. If set to on Squid will recognize each
    "quoted string" after a configuration directive as a single parameter

This is a Measurement Factory project

11 years agoBug 3879: assertion failed ConnStateData::validatePinnedConnection
Martin Stolle [Thu, 18 Jul 2013 05:02:23 +0000 (23:02 -0600)] 
Bug 3879: assertion failed ConnStateData::validatePinnedConnection

11 years agoDocumented space() methods to explain why bugs like 3869 keep happening.
Alex Rousskov [Thu, 18 Jul 2013 02:07:31 +0000 (20:07 -0600)] 
Documented space() methods to explain why bugs like 3869 keep happening.

Hopefully we will not repeat these mistakes with StringNG.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 16 Jul 2013 00:13:03 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agoLog TOS and Netfilter marks set by Squid
Christos Tsantilas [Mon, 15 Jul 2013 15:47:00 +0000 (18:47 +0300)] 
Log TOS and Netfilter marks set by Squid

This patch add new logformat codes to log TOS/DSCP values and netfilter marks
for client and server connections. If multiple outgoing connections were used,
the last used connection value logged.
The values printed in hexadecimal form.
The logformat codes are:
   %>tos    Client connection tos mark set by Squid
   %<tos    Server connection tos mark set by Squid
   %>nfmark Client connection netfilter mark set by Squid
   %<nfmark Server connection netfilter mark set by Squid

This patch also modify qos related code to set Comm::Connection::nfmark and
Comm::Connection::tos members in Ip::Qos::setSockNfmark and Ip::Qos::setSockTos
methods. The Comm::Connection members are now set only if the tos and nfmark
set successfuly.

This is a Measurement Factory project