]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
10 years agoAdd suffix operators to Tokenizer
Amos Jeffries [Fri, 6 Feb 2015 12:07:01 +0000 (04:07 -0800)] 
Add suffix operators to Tokenizer

In some situations we need to tokenize a fixed-length buffer in reverse.

10 years agoMerge from trunk rev.13907
Amos Jeffries [Wed, 4 Feb 2015 22:11:38 +0000 (14:11 -0800)] 
Merge from trunk rev.13907

10 years agoDrop unused cbdata.h definitions and re-document
Amos Jeffries [Wed, 4 Feb 2015 21:37:28 +0000 (13:37 -0800)] 
Drop unused cbdata.h definitions and re-document

Remove the now unused cbdataFree, cbdataAlloc, CBDATA_TYPE,
CBDATA_INIT_TYPE, CBDATA_INIT_TYPE_FREECB symbols.

Re-write CBDATA documentation to reflect the current available
API symbols, their usage, and mechanisms that should be used
instead of CBDATA such as AsyncJob/Call and RefCount.

Along with some doxygen polishing to meet currently agreed
style for how to document major code features.

Make generic_cbdata::data a private member. The constructor
and unwrap() operator provide all necessary public API.

Replace store_client.cc use of cbdataInternalLock/Unlock with
a CbcPointer<> smart pointer equivalent. The use remains an
abuse of CBDATA, just no longer directly referencing the
internal API functions.

10 years agoSourceFormat Enforcement
Source Maintenance [Wed, 4 Feb 2015 18:12:07 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoFix some cbdataFree related memory leaks
Amos Jeffries [Wed, 4 Feb 2015 17:38:27 +0000 (09:38 -0800)] 
Fix some cbdataFree related memory leaks

The delete operator should have been called for these objects after
previous code changes converted them to CBDATA_CLASS. As a result any
member objects relying on their destructor to cleanup were being leaked.

Also, make generic_cbdata::data a private member. The unwrap() method is
easily used now.

10 years agoCleanup: migrate external ACL classes to CBDATA_CLASS API
Amos Jeffries [Wed, 4 Feb 2015 16:45:30 +0000 (08:45 -0800)] 
Cleanup: migrate external ACL classes to CBDATA_CLASS API

10 years agoFix typo in rev.13902
Amos Jeffries [Wed, 4 Feb 2015 03:22:38 +0000 (19:22 -0800)] 
Fix typo in rev.13902

10 years agoCleanup: migrate DigestFetchState to CBDATA_CLASS API
Amos Jeffries [Wed, 4 Feb 2015 01:45:43 +0000 (17:45 -0800)] 
Cleanup: migrate DigestFetchState to CBDATA_CLASS API

10 years agoCleanup: migrate dns_internal objects to CBDATA_CLASS API
Amos Jeffries [Tue, 3 Feb 2015 21:24:30 +0000 (13:24 -0800)] 
Cleanup: migrate dns_internal objects to CBDATA_CLASS API

10 years agoCleanup: migrate ESI objects to CBDATA_CLASS API
Amos Jeffries [Tue, 3 Feb 2015 15:42:23 +0000 (07:42 -0800)] 
Cleanup: migrate ESI objects to CBDATA_CLASS API

Replace several objects use of CBDATA_TYPE to CBDATA_CLASS.

Change esiRemove from CBDATA to MEMPROXY_CLASS.

Remove dead code from earlier CBDATA updates.

10 years agoCleanup: migrate clientStreamNode to CBDATA_CLASS API
Amos Jeffries [Tue, 3 Feb 2015 11:50:49 +0000 (03:50 -0800)] 
Cleanup: migrate clientStreamNode to CBDATA_CLASS API

10 years agoCleanup: migrate netdbExchangeState to CBDATA_CLASS API
Amos Jeffries [Tue, 3 Feb 2015 11:21:26 +0000 (03:21 -0800)] 
Cleanup: migrate netdbExchangeState to CBDATA_CLASS API

Also fixes a compile error for pinger when --disable-inline is used.

10 years agoSourceFormat Enforcement
Source Maintenance [Tue, 3 Feb 2015 00:12:07 +0000 (00:12 +0000)] 
SourceFormat Enforcement

10 years agoCleanup: migrate AclSizeLimit to CBDATA_CLASS API
Amos Jeffries [Mon, 2 Feb 2015 20:02:55 +0000 (12:02 -0800)] 
Cleanup: migrate AclSizeLimit to CBDATA_CLASS API

10 years agoCleanup: migrate acl_tos and acl_nfmark to CBDATA_CLASS API
Amos Jeffries [Mon, 2 Feb 2015 18:51:25 +0000 (10:51 -0800)] 
Cleanup: migrate acl_tos and acl_nfmark to CBDATA_CLASS API

Also a little documentation and syntax polishing.

10 years agoSourceFormat Enforcement
Source Maintenance [Mon, 2 Feb 2015 18:12:05 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoCleanup: migrate AclAddress to CBDATA_CLASS API
Amos Jeffries [Mon, 2 Feb 2015 16:20:11 +0000 (08:20 -0800)] 
Cleanup: migrate AclAddress to CBDATA_CLASS API

Also, shuffle into the Acl:: namespace

10 years agoImplement forward and reverse input iterators for SBuf.
Francesco Chemolli [Mon, 2 Feb 2015 15:21:19 +0000 (16:21 +0100)] 
Implement forward and reverse input iterators for SBuf.

10 years agoCleaup: migrate Logfile to CBDATA_CLASS API
Amos Jeffries [Mon, 2 Feb 2015 13:10:38 +0000 (05:10 -0800)] 
Cleaup: migrate Logfile to CBDATA_CLASS API

10 years agoSourceFormat Enforcement
Source Maintenance [Mon, 2 Feb 2015 00:12:04 +0000 (00:12 +0000)] 
SourceFormat Enforcement

10 years agoCleanup: migrate CachePeer to CBDATA_CLASS API
Amos Jeffries [Sun, 1 Feb 2015 21:25:46 +0000 (13:25 -0800)] 
Cleanup: migrate CachePeer to CBDATA_CLASS API

Replace the alloc/free for CachePeer with new/delete from
the CBDATA_CLASS API.

Shuffle class member default values to constructor.

Shuffle class cleanup code from the (3!) different mechanisms
where it was being done to the class destructor. Also
releasing some memory which was previously leaked on
reconfigure.

Drop the now unused CBDUNL type definition and peerDestroy()
cleanup handler for CachePeer.

10 years agoAdded documentation for SBufIterator, fixed SBuf unit test, simplified SBufIterator
Francesco Chemolli [Sun, 1 Feb 2015 17:15:32 +0000 (18:15 +0100)] 
Added documentation for SBufIterator, fixed SBuf unit test, simplified SBufIterator

10 years agoBug 4172: Solaris broken krb5-config
Amos Jeffries [Sun, 1 Feb 2015 07:05:48 +0000 (23:05 -0800)] 
Bug 4172: Solaris broken krb5-config

10 years agoImplemented SBuf forward and reverse input iterators
Francesco Chemolli [Sat, 31 Jan 2015 19:41:00 +0000 (20:41 +0100)] 
Implemented SBuf forward and reverse input iterators

10 years agoPer-rule refresh_pattern matching statistics
Amos Jeffries [Sat, 31 Jan 2015 19:09:22 +0000 (08:09 +1300)] 
Per-rule refresh_pattern matching statistics

.. to make it blindingly obvious from the cachemgr report which rules
are completely useless. Such as when the global dot pattern (.) is
placed ahead of custom rules, or one rules pattern is always a subset
of an earlier pattern.

This also allows sysadmin to tune refresh_pattern ordering so most
commonly matching rules are first.

10 years agoSourceFormat Enforcement
Source Maintenance [Sat, 31 Jan 2015 18:12:07 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoDocs: removal of log_access and log_icap in 3.4
Amos Jeffries [Sat, 31 Jan 2015 16:34:08 +0000 (08:34 -0800)] 
Docs: removal of log_access and log_icap in 3.4

10 years agoStop emitting (Proxy-)Authentication-Info for Negotiate
Amos Jeffries [Sat, 31 Jan 2015 14:10:25 +0000 (06:10 -0800)] 
Stop emitting (Proxy-)Authentication-Info for Negotiate

This header is not defined for use by RFC 4559, and there seem to
be no clients actually using it.

The syntax Squid was using to emit the details was also clashing
with the syntax defined for use in Digest which is becoming the
standardized ABNF syntax for the header in general.

10 years agoCleanup: remove strtokFile() wrapper function
Amos Jeffries [Thu, 29 Jan 2015 19:05:24 +0000 (11:05 -0800)] 
Cleanup: remove strtokFile() wrapper function

This global function was a wrapper around ConfigParser::strtokFile()
which did nothing but cause additional dependency on cache_cf.h and
cache_cf.cc.

10 years agoSourceFormat Enforcement
Source Maintenance [Thu, 29 Jan 2015 18:12:06 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoSourceLayout: shuffle DNS primitives to dns/libdns.la
Amos Jeffries [Thu, 29 Jan 2015 16:09:11 +0000 (08:09 -0800)] 
SourceLayout: shuffle DNS primitives to dns/libdns.la

* create dns/libdns.la with namespace Dns::

* move the RFC specific base functions performing DNS actions
  into libdns.

* move the SquidDns.h definitions to dns/forward.h
  - rename dns*() functions to Dns:: namespace

* move DnsLookupDetails to Dns:: namespace
  - move class files to libdns.

There are no logic changes in this patch.

10 years agoFix rev.13879
Amos Jeffries [Sun, 25 Jan 2015 07:25:48 +0000 (23:25 -0800)] 
Fix rev.13879

10 years agoOlder Clang versions do not seem to offer full C++11 std::splice API
Amos Jeffries [Sun, 25 Jan 2015 04:53:40 +0000 (20:53 -0800)] 
Older Clang versions do not seem to offer full C++11 std::splice API

10 years agoRemove dst ACL dependency on HTTP request message existence
Amos Jeffries [Sun, 25 Jan 2015 04:48:21 +0000 (20:48 -0800)] 
Remove dst ACL dependency on HTTP request message existence

The ACL checklist dst_addr member can be used in cases where the HTTP
message is not provided. Such as ssl_bump, ICAP outgoing IP, or peer
selection probes.

10 years agoseveral clang versions do not seem to offer std::vector::cbegin and cend
Francesco Chemolli [Sat, 24 Jan 2015 20:09:41 +0000 (21:09 +0100)] 
several clang versions do not seem to offer std::vector::cbegin and cend

10 years agoFix typo in documentation
Amos Jeffries [Sat, 24 Jan 2015 12:35:45 +0000 (04:35 -0800)] 
Fix typo in documentation

10 years agoShuffle skipLineTerminator() to Http1::Parser
Amos Jeffries [Sat, 24 Jan 2015 12:28:38 +0000 (04:28 -0800)] 
Shuffle skipLineTerminator() to Http1::Parser

Bring inline with location from the ResponseParser branch to reduce
future merge conflicts.

10 years agoRemodel parse style based on Response parser review feedback
Amos Jeffries [Sat, 24 Jan 2015 09:52:26 +0000 (01:52 -0800)] 
Remodel parse style based on Response parser review feedback

10 years agoDocs: drop obsolete chunked_request_body_max_size references
Amos Jeffries [Sat, 24 Jan 2015 04:25:44 +0000 (20:25 -0800)] 
Docs: drop obsolete chunked_request_body_max_size references

This option has done nothing since Squid-3.2.

10 years agoMerge from trunk rev.13875
Amos Jeffries [Fri, 23 Jan 2015 11:36:01 +0000 (03:36 -0800)] 
Merge from trunk rev.13875

10 years agoFix typo in rev.13874
Amos Jeffries [Fri, 23 Jan 2015 10:30:32 +0000 (02:30 -0800)] 
Fix typo in rev.13874

10 years agoFix ::Parser::Tokenizer::prefix() limited token results
Amos Jeffries [Fri, 23 Jan 2015 10:11:15 +0000 (02:11 -0800)] 
Fix ::Parser::Tokenizer::prefix() limited token results

When he prefix() method is passed a set limit for characters to scan and
the matched characters do reach that limit the entire Tokenizer buffer
content is consumed and returned.

Correct operation is to only consume and return the matched characters.

10 years agoAdd missing root CAs when validating chains that passed internal checks.
Christos Tsantilas [Fri, 23 Jan 2015 09:27:47 +0000 (11:27 +0200)] 
Add missing root CAs when validating chains that passed internal checks.

When internal checks found no certificate errors, Squid does not include root
CA certificate in certificates chain sent to the certificate validator. Squid
just sent the certificates chain sent by the SSL server.

This patch stores the full certificates list built by OpenSSL while validating
the SSL server certificates chain, even if no certificate error found and sends
this list to certificate validator.

This is a Measurement Factory project

10 years agoFix typos in rev.13864
Amos Jeffries [Thu, 22 Jan 2015 13:55:00 +0000 (05:55 -0800)] 
Fix typos in rev.13864

We do not use the "SSL_OP_" OpenSSL symbol prefix in squid.conf UI,
just name the option.

10 years agoRFC 7230 compliant request-line parser based on Tokenizer API
Amos Jeffries [Thu, 22 Jan 2015 12:54:08 +0000 (04:54 -0800)] 
RFC 7230 compliant request-line parser based on Tokenizer API

Refactor the request-line parser using a Tokenizer.

RFC 7230 requirements provide field terminator/delimiter limitations and
character sets for token validation. Also provides definitions of
boundaries for relaxed/tollerant parsing without needing Squid-specific
RFC violations.

This implementation is slightly stricter regarding whitespace in URLs
than previous implementation. It obeys a SHOULD requirement in RFC 7230
regarding responding with 400 status to those broken request messages.

10 years agoFix Tokenizer::prefix when fetching length limited tokens
Amos Jeffries [Thu, 22 Jan 2015 12:53:11 +0000 (04:53 -0800)] 
Fix Tokenizer::prefix when fetching length limited tokens

10 years agoSourceFormat Enforcement
Source Maintenance [Thu, 22 Jan 2015 12:12:09 +0000 (12:12 +0000)] 
SourceFormat Enforcement

10 years agoSet cap_net_admin capability when Squid sets TOS/Diffserv packet values.
Christos Tsantilas [Thu, 22 Jan 2015 11:02:31 +0000 (13:02 +0200)] 
Set cap_net_admin capability when Squid sets TOS/Diffserv packet values.

In capabilities-capable environments (e.g., Linux with libcap), CAP_NET_ADMIN
capability is required to honor clientside_tos and tcp_outgoing_tos
directives. The code was setting that capability when Netfilter marks or
tproxy was enabled, but missed the clientside_tos and tcp_outgoing_tos cases.

This is a Measurement Factory project

10 years agoSourceFormat Enforcement
Source Maintenance [Wed, 21 Jan 2015 18:12:04 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoMoved PID file management from Coordinator to Master: fix clang compiler error
Christos Tsantilas [Wed, 21 Jan 2015 15:47:05 +0000 (17:47 +0200)] 
Moved PID file management from Coordinator to Master: fix clang compiler error

clang compilar complains for empty body in if statement:
     src/main.cc:1706:9: error: if statement has empty body

10 years agoMoved PID file management from Coordinator to Master.
Christos Tsantilas [Wed, 21 Jan 2015 12:08:35 +0000 (14:08 +0200)] 
Moved PID file management from Coordinator to Master.

This move is the first step necessary to avoid the following race condition
among PID file deletion and shared segment creation/destruction in SMP Squid:

  O1) The old Squid Coordinator removes its PID file and quits.
  N1) The system script notices Coordinator death and starts the new Squid.
  N2) Shared segments are created by the new Master process.
  O2) Shared segments are removed by the old Master process.
  N3) New worker/disker processes fail due to missing segments.

TODO: The second step (not a part of this change) is to delete shared memory
segments before PID file is deleted (all in the Master process after this
change).

Now the Master process receives signals and is responsible for forwarding them
to the kids.

The kids does not install default signal handler for shudown signals (SIGINT,
SIGTERM) after a signal received. If a second shutdown signal is received then
squid imediatelly terminates the event loop and exits.

When the "kill-parent-hack" is enabled the kids are sending the kill signal
to master process and master process forward it to other kids too.

Also a small regression added: The PID file can no longer be renamed using
hot reconfiguration. A full Squid restart is now required for that.

This is a Measurement Factory project.

10 years agoBug 4066: Digest auth nonce indefinite rollover
Frederic Bourgeois [Tue, 20 Jan 2015 10:29:45 +0000 (02:29 -0800)] 
Bug 4066: Digest auth nonce indefinite rollover

10 years agoBug 3920: Splay::remove() reference counting inconsistent
Amos Jeffries [Mon, 19 Jan 2015 14:22:29 +0000 (06:22 -0800)] 
Bug 3920: Splay::remove() reference counting inconsistent

10 years agoSSL_OP_NO_TICKET SSL option to http[s]_port
Christos Tsantilas [Mon, 19 Jan 2015 12:11:08 +0000 (14:11 +0200)] 
SSL_OP_NO_TICKET SSL option to http[s]_port

If this option is set the TLS ticket extension disabled.

When TLS ticket extension is disabled squid is still able to use SSL shared
sessions if this feature is not disabled.

This is a Measurement Factory project

10 years agoPortability: Make strict compilers happier with rev.13860
Amos Jeffries [Mon, 19 Jan 2015 03:01:59 +0000 (19:01 -0800)] 
Portability: Make strict compilers happier with rev.13860

10 years agoSourceFormat Enforcement
Source Maintenance [Mon, 19 Jan 2015 00:12:07 +0000 (00:12 +0000)] 
SourceFormat Enforcement

10 years agoFix force_request_body_continuation bug
Christos Tsantilas [Sun, 18 Jan 2015 18:49:26 +0000 (20:49 +0200)] 
Fix force_request_body_continuation bug

When the force_request_body_continuation access list is configured squid is
sends 100-Continue responses to all HTTP GET messages unless the admin
is very careful with the ACLs. This can be reproduced trivially with

  force_request_body_continuation allow all

We should not evaluate force_request_body_continuation if the request
does not include "Expect: 100-continue" header.

This is a Measurement Factory project

10 years agoSupport rotate=N option on access_log
Amos Jeffries [Sun, 18 Jan 2015 16:34:13 +0000 (08:34 -0800)] 
Support rotate=N option on access_log

Add a rotate=N option to access_log directive to set per-log what the
retained log count will be. At present it is only used by the stdio:
logging module, which is also the only one to use logfile_rotate
directive.

If this option is absent (as will be the common case) the log rotation
defaults to using the value of logfile_rotate directive.

Also, add missing dump output of other access_log options if they differ
from the defaults.

The use-cases for this are:

1) Unix fifo logging requires all the stdio: module operations except
that the normal rotate/rename operation is NOT performed on the fifo
socket. It makes more sense to add this option which can also meet case
#2 than to create a whole new module just for fifo.

2) managing only some access_log files with a third-party log manager.
Those specific logs need rotate=0, but the Squid managed logs may
require non-0 values.

10 years agoUse non-const iterators in UserData.cc as they are not supported on FreeBSD 9.1/clan 3.1
Francesco Chemolli [Sat, 17 Jan 2015 17:50:35 +0000 (18:50 +0100)] 
Use non-const iterators in UserData.cc as they are not supported on FreeBSD 9.1/clan 3.1

10 years agosquidclient: buf reuse looses encoded header data after rev.13785
Amos Jeffries [Sat, 17 Jan 2015 17:20:05 +0000 (09:20 -0800)] 
squidclient: buf reuse looses encoded header data after rev.13785

10 years agoFix several crashes when debugging enabled
Amos Jeffries [Sat, 17 Jan 2015 14:03:29 +0000 (06:03 -0800)] 
Fix several crashes when debugging enabled

psstate->entry may be null, it is not safe to directly access the entry
url() method. Use the safe alternative offered by psstate instead.

10 years agoBug 3997: Excessive NTLM or Negotiate auth helper annotations
Amos Jeffries [Sat, 17 Jan 2015 09:15:53 +0000 (01:15 -0800)] 
Bug 3997: Excessive NTLM or Negotiate auth helper annotations

With the transaction annotations feature added in Squid-3.4 auth
helper response values get recorded as annotatiions. In the case
of NTLM and Negotiate authentication the helper response contains
a large credentials token which changes frequently.

Also, user credentials state is cached. In the case of NTLM and
Negotiate the active credentials are cached in the TCP connection
state data, but also for the cache mgr helper reports make use of
caching in a global username cache.

When these two features are combined, the global username cache
for mgr reporting accumulates all TCP connection specific
token= values presented by the client on all its connections, and
any changes to the token over its lifetime.

The result is that for users performing either many transactions,
or staying connected for long periods the memory consumption from
unnecesarily stored tokens is excessive. When clients do both the
machine memory can be consumed, and the CPU can reach 100%
consumption just walking the annotations lists during regular
operations.

To fix this we drop the security credentials tokens from cached
annotations list in NTLM and Negotiate. Digest is also included
though its HA1 token value is static it has similar privacy issues
related to storage.

Also, use the new 3.5 APi for username cache key creation to build
the global username cache key for NTLM/Negotiate using the TCP
connection specific token so that credentials and associated
tokens do not get accidentally shared between connections and the
manager can accurately report users.

10 years agoRelease notes update for 3.5
Amos Jeffries [Sat, 17 Jan 2015 04:37:06 +0000 (20:37 -0800)] 
Release notes update for 3.5

10 years agoSourceFormat Enforcement
Source Maintenance [Fri, 16 Jan 2015 18:12:04 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoNon-HTTP bypass
Christos Tsantilas [Fri, 16 Jan 2015 16:18:05 +0000 (18:18 +0200)] 
Non-HTTP bypass

Intercepting proxies often receive non-HTTP connections. Squid cannot currently
deal with such connections well because it assumes that a given port receives
HTTP, FTP, or HTTPS traffic exclusively. This patch allows Squid to tunnel
unexpected connections instead of terminating them with an error.

In this project, we define an unexpected connection as a connection that
resulted in a Squid error during first request parsing. Which errors trigger
tunneling behavior is configurable by the admin using ACLs.

Here is a configuration sketch:

  # define what Squid errors indicate receiving non-HTTP traffic:
  acl foreignProtocol squid_error ERR_PROTOCOL_UNKNOWN ERR_TOO_BIG

  # define what Squid errors indicate receiving nothing:
  acl serverTalksFirstProtocol squid_error ERR_REQUEST_START_TIMEOUT

  # tunnel everything that does not look like HTTP:
  on_first_request_error tunnel foreignProtocol

  # tunnel if we think the client waits for the server to talk first:
  on_first_request_error tunnel serverTalksFirstProtocol

  # in all other error cases, just send an HTTP "error page" response:
  on_first_request_error respond all

  # Configure how long to wait for the first byte on the incoming
  # connection before raising an ERR_REQUEST_START_TIMEOUT error.
  request_start_timeout 5 seconds

The overall intent of this TCP tunnel is to get Squid out of the communication
loop to the extent possible. Once the decision to tunnel is made, no Squid
errors are going to be sent to the client and tunneled traffic is not going to
be sent to Squid adaptation services or logged to access.log (except for a
single summary line at the end of the transaction). Connection closure at the
server (or client) end of the tunnel is propagated to the other end by closing
the corresponding connection.

This patch also:

 Add "on_first_request_error", a new ACL-driven squid.conf directive that can
be used to establish a blind TCP tunnel which relays all bytes from/to the
intercepted connection to/from the intended destination address. See the sketch
above.
The on_first_request_error directive supports fast ACLs only.

 Add "squid_error", a new ACL type to match transactions that triggered a given
Squid error. Squid error IDs are used to configure one or more errors to match.
This is similar to the existing ssl_error ACL type but works with
Squid-generated errors rather than SSL library errors.

 Add "ERR_PROTOCOL_UNKNOWN", a Squid error triggered for http_port connections
that start with something that lacks even basic HTTP request structure. This
error is triggered by the HTTP request parser, and probably only when/after the
current parsing code detects an error. That is, we do not want to introduce
new error conditions, but we want to treat some of the currently triggered
parsing errors as a "wrong protocol" error, possibly after checking the parsing
state or the input buffer for some clues. There is no known way to reliably
distinguish malformed HTTP requests from non-HTTP traffic so the parser has
to use some imprecise heuristics to make a decision in some cases.
In the future, it would be possible to add code to reliably detect some popular
non-HTTP protocols, but adding such code is outside this project scope.

 Add "request_start_timeout", a new squid.conf directive to trigger a new
Squid ERR_REQUEST_START_TIMEOUT error if no bytes are received from the
client on a newly established http_port connection during the configured
time period. Applies to all http_ports (for now).

No support for tunneling through cache_peers is included. Configurations
that direct outgoing traffic through a peer may break Squid.

This is a Measurement Factory project

10 years agoFix mismatched new/free in rev.13849
Amos Jeffries [Fri, 16 Jan 2015 15:28:00 +0000 (07:28 -0800)] 
Fix mismatched new/free in rev.13849

Objects created with 'new' require 'delete'.

  Detected by Coverity Scan. Issue 12643861264387.

10 years agoFix off-by-one error in rev.13834
Amos Jeffries [Fri, 16 Jan 2015 15:16:24 +0000 (07:16 -0800)] 
Fix off-by-one error in rev.13834

 Detected by Coverity Scan. Issue 1264388.

10 years agoFix silent SSL/TLS failure on split-stack operating systems
Amos Jeffries [Wed, 14 Jan 2015 17:10:20 +0000 (09:10 -0800)] 
Fix silent SSL/TLS failure on split-stack operating systems

Up to now we have not cloned any of the SSL/TLS related config state if
the port needed cloning into separate IPv6 and IPv4 sockets.

It is safe enough to clone the text strings received directly from
squid.conf and rely on later port setup to generate separate sslContext
objects.

10 years agoReplace Splay with std::set in several ACL types
Francesco Chemolli [Wed, 14 Jan 2015 14:17:00 +0000 (15:17 +0100)] 
Replace Splay with std::set in several ACL types

10 years agoMerged from trunk
Francesco Chemolli [Wed, 14 Jan 2015 10:36:14 +0000 (11:36 +0100)] 
Merged from trunk

10 years agoSourceFormat Enforcement
Source Maintenance [Tue, 13 Jan 2015 12:12:06 +0000 (12:12 +0000)] 
SourceFormat Enforcement

10 years agoFix typo in 3.5 release notes
Amos Jeffries [Tue, 13 Jan 2015 11:39:40 +0000 (03:39 -0800)] 
Fix typo in 3.5 release notes

10 years agoFix duplicate include of squid.h
Amos Jeffries [Tue, 13 Jan 2015 11:14:12 +0000 (03:14 -0800)] 
Fix duplicate include of squid.h

10 years agoIncorporated Amos suggestions
Francesco Chemolli [Tue, 13 Jan 2015 10:23:56 +0000 (11:23 +0100)] 
Incorporated Amos suggestions

10 years agoPrep for 3.4.11 and 3.5.1
Amos Jeffries [Tue, 13 Jan 2015 10:23:51 +0000 (02:23 -0800)] 
Prep for 3.4.11 and 3.5.1

10 years agoMerged from trunk
Francesco Chemolli [Tue, 13 Jan 2015 08:42:16 +0000 (09:42 +0100)] 
Merged from trunk

10 years agoMinGW: various fixes in libcompat addrinfo API
Dennis Felippa [Tue, 13 Jan 2015 08:22:55 +0000 (00:22 -0800)] 
MinGW: various fixes in libcompat addrinfo API

10 years agoSourceFormat Enforcement
Source Maintenance [Tue, 13 Jan 2015 07:25:36 +0000 (07:25 +0000)] 
SourceFormat Enforcement

10 years agoMaintain copyright blurb claims across end of year
Source Maintenance [Tue, 13 Jan 2015 07:02:31 +0000 (07:02 +0000)] 
Maintain copyright blurb claims across end of year

10 years agoFix typo in rev.13840
Amos Jeffries [Tue, 13 Jan 2015 05:09:18 +0000 (21:09 -0800)] 
Fix typo in rev.13840

10 years agoWindows: auto-detect InetNtopA and InetPtonA
Amos Jeffries [Tue, 13 Jan 2015 04:53:25 +0000 (20:53 -0800)] 
Windows: auto-detect InetNtopA and InetPtonA

Also, add missing wrapper definition for inet_pton()

10 years agoPorted ACLStringData from Splay to std::set<SBuf>
Francesco Chemolli [Mon, 12 Jan 2015 21:22:00 +0000 (22:22 +0100)] 
Ported ACLStringData from Splay to std::set<SBuf>

10 years agoMerged from trunk
Francesco Chemolli [Mon, 12 Jan 2015 15:55:56 +0000 (16:55 +0100)] 
Merged from trunk

10 years agoImprove proxy_acl mgr:config output
Francesco Chemolli [Mon, 12 Jan 2015 15:53:58 +0000 (16:53 +0100)] 
Improve proxy_acl mgr:config output

10 years agoPortability: skip redefinition of inet_ntop/inet_pton
Amos Jeffries [Mon, 12 Jan 2015 14:27:01 +0000 (06:27 -0800)] 
Portability: skip redefinition of inet_ntop/inet_pton

... even if ./configure detects their absence they may be pulled in from
elsewhere. Such as our own compat/os/ headers (eg. on Windows).

10 years agoFix acl formatting in config CacheMgr action
Francesco Chemolli [Mon, 12 Jan 2015 13:24:52 +0000 (14:24 +0100)] 
Fix acl formatting in config CacheMgr action

10 years agoSmall debugs improvements
Francesco Chemolli [Mon, 12 Jan 2015 12:06:38 +0000 (13:06 +0100)] 
Small debugs improvements

10 years agoMerged from trunk
Francesco Chemolli [Mon, 12 Jan 2015 08:35:36 +0000 (09:35 +0100)] 
Merged from trunk

10 years agosquidclient: Fix -A and -P options
Amos Jeffries [Mon, 12 Jan 2015 08:11:06 +0000 (00:11 -0800)] 
squidclient: Fix -A and -P options

With --https addition the A and P values are re-used for --cert and
--params within HTTPS options. This works for long options, but they
cannot be listed as short options by the Transport:: module because
they are required at the top level by old-style HTTP parameters.

10 years agoInterim: Userdata migrated, but issues with parsing
Francesco Chemolli [Sun, 11 Jan 2015 20:30:01 +0000 (21:30 +0100)] 
Interim: Userdata migrated, but issues with parsing

10 years agoSource Layout: shuffle HttpServer to Http1::Server
Amos Jeffries [Fri, 9 Jan 2015 00:33:37 +0000 (16:33 -0800)] 
Source Layout: shuffle HttpServer to Http1::Server

No logic changes. Just class and namespace renaming.

10 years agoUpdate IPC sockets verification check
Amos Jeffries [Thu, 8 Jan 2015 23:41:52 +0000 (15:41 -0800)] 
Update IPC sockets verification check

Coverity Scan gets confused by the code trick of using memset() on a
buffer then filling arbitrary string data into all but the final byte of
that buffer - thus implicitly null terminating.

Try an explicit null termination instead of memset(), this should make
Coverity a bit happier and is also faster than zero'ing the entire buf.

Coverity Issue 1258700

10 years agoWorkaround several Coverity scan false positives
Amos Jeffries [Thu, 8 Jan 2015 23:27:17 +0000 (15:27 -0800)] 
Workaround several Coverity scan false positives

Coverity gets confused by SBuf::npos value used as implicit append()
length parameter for special case when SBuf is required to call strlen()

Remove some unnecesary uses of that overloaded form of append().

10 years agocachemgr.cgi: memory leak in request parser
Amos Jeffries [Thu, 8 Jan 2015 23:06:40 +0000 (15:06 -0800)] 
cachemgr.cgi: memory leak in request parser

Leaks a block of memory for each header parsed the size of the header.

The CGI is rarely operating for long periods, it is run as-needed by
servers so the memory leak does not accumulate long term.

  Detectd by Coverity Scan. Issue 1256164

10 years agocachemgr.cgi: exit on base64 decode failures
Amos Jeffries [Thu, 8 Jan 2015 23:00:40 +0000 (15:00 -0800)] 
cachemgr.cgi: exit on base64 decode failures

  Detected by Coverity Scan. Issue 1261431

10 years agosquidclient: Fix incorrect use of delete on GSSAPI tokens
Amos Jeffries [Thu, 8 Jan 2015 22:56:44 +0000 (14:56 -0800)] 
squidclient: Fix incorrect use of delete on GSSAPI tokens

  Detected by Coverity Scan. Issue 1261432

10 years agontlm_fake_auth: fix null pointer dereference
Amos Jeffries [Thu, 8 Jan 2015 22:47:22 +0000 (14:47 -0800)] 
ntlm_fake_auth: fix null pointer dereference

 Detected by Coverity Scan. Issue 1261433

10 years agoBug 3760: fix typo in earlier patch
Amos Jeffries [Thu, 8 Jan 2015 22:11:24 +0000 (14:11 -0800)] 
Bug 3760: fix typo in earlier patch

10 years agoAdd warning when user acl is REQUIRED but still contains users
Francesco Chemolli [Thu, 8 Jan 2015 09:49:54 +0000 (10:49 +0100)] 
Add warning when user acl is REQUIRED but still contains users

10 years agoPorted ACLUserData, to be finished
Francesco Chemolli [Wed, 7 Jan 2015 18:06:15 +0000 (19:06 +0100)] 
Ported ACLUserData, to be finished