]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
8 years agomempools-nozero part 2: wordlist
Francesco Chemolli [Mon, 24 Aug 2015 16:51:17 +0000 (18:51 +0200)] 
mempools-nozero part 2: wordlist

Implement constructors for wordlist allowing them to support non-zeroing pools
Make destructor private in order to force clients to use wordlistDestroy
Implement wordlistChopHead to support the only user of deleting the head of a wordlist

8 years agomempools-nozero part 1: fix ctors of classes declared MEMPROXY_CLASS
Francesco Chemolli [Mon, 24 Aug 2015 14:20:07 +0000 (16:20 +0200)] 
mempools-nozero part 1: fix ctors of classes declared MEMPROXY_CLASS

8 years agoBug 4278: Docs: typo in the refresh_pattern freshness algorithm
Javad Kouhi [Mon, 24 Aug 2015 12:18:26 +0000 (05:18 -0700)] 
Bug 4278: Docs: typo in the refresh_pattern freshness algorithm

8 years agoDocs: auto-build release notes for snapshots
Amos Jeffries [Sun, 23 Aug 2015 11:53:54 +0000 (04:53 -0700)] 
Docs: auto-build release notes for snapshots

This adds conditional build support to generate release notes whenever
a tarball is being created, regardless of what the code branch status
is. All that is required is the linuxdoc tool chain.

Formal release branch snapshots have been publishing the notes files
built for their previous release. But development versions of Squid
have not been getting documented at all which can be annoying for
testers.

The release-N.html file is also removed from the repository. With this
update it should no longer be needed by the snapshot machinery.

8 years agoDocs: make snapshots pull RELEASENOTES.html from top directory
Amos Jeffries [Sun, 23 Aug 2015 06:35:30 +0000 (23:35 -0700)] 
Docs: make snapshots pull RELEASENOTES.html from top directory

Prevent the need to go searching for release notes by version. Pull a
a copy from the top-level sources directory if any exist there.

The latest squid 4+ versions will (soon) be creating that file for this
and downstream distributors use.

8 years agoTLS: failure of https:// context non-fatal for non-OpenSSL builds
Amos Jeffries [Sat, 22 Aug 2015 19:06:46 +0000 (12:06 -0700)] 
TLS: failure of https:// context non-fatal for non-OpenSSL builds

Only OpenSSL library is 'guaranteed' to produce a TLS context at this point
in the conversion to library-agnostic security. Any others may produce
nothing.

Match the DBG_IMPORTANT used for debug level of the 'initializing' message.

8 years agoTurn Ftp::Server::EarlyErrorKind into C++11 strongly-typed enum
Francesco Chemolli [Fri, 21 Aug 2015 14:00:28 +0000 (16:00 +0200)] 
Turn Ftp::Server::EarlyErrorKind into C++11 strongly-typed enum

8 years agoCleanup: fix assertion in Store unit tests
Amos Jeffries [Fri, 21 Aug 2015 09:43:53 +0000 (02:43 -0700)] 
Cleanup: fix assertion in Store unit tests

The old Squid String implementation cannot handle appending nullptr or
negative lengths. So if the test code using CapturingStoreEntry ever
tries to append such it will crash instead of working like a StoreEntry
should.

8 years agoDocs: fix typo in miss_access
Lubos Uhliarik [Thu, 20 Aug 2015 12:28:33 +0000 (05:28 -0700)] 
Docs: fix typo in miss_access

8 years agoSourceFormat Enforcement
Source Maintenance [Thu, 20 Aug 2015 12:12:20 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoRework r14231, hopefully in a more portable way
Francesco Chemolli [Thu, 20 Aug 2015 12:01:01 +0000 (14:01 +0200)] 
Rework r14231, hopefully in a more portable way

8 years agoRevert override keyword in Ftp::Server::callException
Francesco Chemolli [Thu, 20 Aug 2015 09:55:56 +0000 (11:55 +0200)] 
Revert override keyword in Ftp::Server::callException

If even one only method is marked override in a class, then clang
requires all overriding methods in the class to be marked as such.
This uncovers a problem where toCbdata is defined virtual in
AsyncJob (which Ftp::Server inherits from) and implemented nonvirtual
in the CBDATA_CLASS macro. Fixing this will be the result of a sepearate
effort, for now covering up by removing keyword and marking XXX.

8 years agoWork around clang complaining of unknown attributes in libxml2
Francesco Chemolli [Thu, 20 Aug 2015 02:44:31 +0000 (04:44 +0200)] 
Work around clang complaining of unknown attributes in libxml2

8 years agoFtpServer.cc:1024: "reply != NULL" assertion
Christos Tsantilas [Wed, 19 Aug 2015 10:18:02 +0000 (13:18 +0300)] 
FtpServer.cc:1024: "reply != NULL" assertion

Handle nil HttpReply pointer inside various handlers called from
Ftp::Server::handleReply(). For example, when the related StoreEntry
object is aborted, the client_side_reply.cc code may call the
Ftp::Server::handleReply() method with a nil reply pointer.

The Ftp::Server::handleReply() methods itself cannot handle nil replies
because they are valid in many states. Only state-specific handlers know
whether they need the reply.

The Ftp::Server::handleReply() method is called [via Store] from Client code.
Thus, exceptions in handleReply() are handled by the Ftp::Client job. That job
does not have enough information to know whether the client-to-Squid connection
should be closed; the job keeps the connection open. When the reply is nil,
that open connection becomes unusable, leading to more problems.

This patch fixes the Ftp::Server::handleReply() to handle exceptions,
including closing the connections in the case of an exception. It also
adds Must(reply) checks to check for nil HttpReply pointers where the
reply is required. Eventually, Store should start using async calls to
protect jobs waiting for Store updates. Meanwhile, this should help.

This is a Measurement Factory project.

8 years agoDocs: Release Notes update for 4.0
Amos Jeffries [Tue, 18 Aug 2015 15:13:58 +0000 (03:13 +1200)] 
Docs: Release Notes update for 4.0

* Document C++11 requirement for compilers.

* Document ICAPS support

* Document Elliptic Curve Diffi-Hellman updates

* Document SMP updates affecting feature availability

Also, some squid.conf.documented updates for new features:

* Update icap_service TLS options to replace "ssl" prefix with "tls-"
  on newly added options.

* Remove icap_service 'sslcapath=' option from public display.
 It is still supported, but not very portable outside OpenSSL so
 do not encourage use at this time.

8 years agoSourceFormat Enforcement
Source Maintenance [Mon, 17 Aug 2015 12:12:10 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoIgnore impossible SSL bumping actions, as intended and documented.
Christos Tsantilas [Mon, 17 Aug 2015 07:16:17 +0000 (10:16 +0300)] 
Ignore impossible SSL bumping actions, as intended and documented.

According to Squid wiki: "Some actions are not possible during
certain processing steps. During a given processing step, Squid
ignores ssl_bump lines with impossible actions". The distributed
squid.conf.documented has similar text.

Current Squid violates the above rule. Squid considers all actions,
and if an impossible action matches first, Squid guesses what the
true configuration intent was. Squid may guess wrong. For example,
depending on the transaction, Squid may guess that a matching
stare or peek action during bumping step3 means "bump", breaking
peeked connections that cannot be bumped.

This unintended but gross configuration semantics violation remained
invisible until bug 4237, probably because most configurations in
most environments either worked around the problem (where admins
experimented to "make it work") or did not result in visible
errors (where Squid guesses did not lead to terminated connections).

While configuration workarounds are possible, the current
implementation is very wrong and leads to overly complex and, hence,
often wrong configurations. It is also nearly impossible to document
accurately because the guessing logic depends on too many factors.

To fix this, we add an action filtering/banning mechanism to Squid
ACL code. This mechanism is then used to:
  - ban client-first and server-first on bumping steps 2 and 3.
  - ban peek and stare actions on bumping step 3.
  - ban splice on step3 if stare is selected on step2 and
    Squid cannot splice the SSL connection any more.
  - ban bump on step3 if peek is selected on step2 and
    Squid cannot bump the connection any more.

The same action filtering mechanism may be useful for other
ACL-driven directives with state-dependent custom actions.

This change adds a runtime performance overhead of a single virtual
method call to all ORed ACLs that do not use banned actions.
That method itself just returns false unless the ACL represents
a whole directive rule. In the latter case, an std::vector size()
is also checked. It is possible to avoid this overhead by adding
a boolean "I may ban actions" flag to Acl::OrNode, but we decided
the small performance harm is not worth the extra code to set
that flag.

This is a Measurement Factory project.

8 years agoBug 4285 partial: %us is not supported in access.log
Amos Jeffries [Sun, 16 Aug 2015 09:19:21 +0000 (02:19 -0700)] 
Bug 4285 partial: %us is not supported in access.log

8 years agoBug 4302: IPFilter v5 transparent interception
Amos Jeffries [Sun, 16 Aug 2015 07:56:20 +0000 (00:56 -0700)] 
Bug 4302: IPFilter v5 transparent interception

8 years agoDocs: update intercept/tproxy related text
Amos Jeffries [Sun, 16 Aug 2015 07:45:04 +0000 (00:45 -0700)] 
Docs: update intercept/tproxy related text

8 years agoSourceFormat Enforcement
Source Maintenance [Thu, 13 Aug 2015 00:12:11 +0000 (00:12 +0000)] 
SourceFormat Enforcement

8 years agoNew SBuf and Tokenizer methods to simplify suffix parsing and skipping
Alex Rousskov [Wed, 12 Aug 2015 22:18:22 +0000 (16:18 -0600)] 
New SBuf and Tokenizer methods to simplify suffix parsing and skipping
(and to make suffix/reverse APIs more similar to prefix/forward ones).

Also reluctantly changed Tokenizer to update parsedSize() when parsing
suffixes, per reviewer request.

8 years agoBug 4301: compile errors with IPFilter interception
Patrick Welche [Tue, 11 Aug 2015 07:25:52 +0000 (00:25 -0700)] 
Bug 4301: compile errors with IPFilter interception

8 years agoBug 4242: compile errors with eCAP using clang-3.6
Pavel Timofeev [Tue, 11 Aug 2015 06:32:29 +0000 (23:32 -0700)] 
Bug 4242: compile errors with eCAP using clang-3.6

8 years agoPolish: add debug section,level to cache.log
Amos Jeffries [Tue, 11 Aug 2015 06:15:34 +0000 (23:15 -0700)] 
Polish: add debug section,level to cache.log

Cache.log produced at level ALL,9 are very verbose, and tracking down
what specific section,level details to log for a shorter trace without
lost details can sometimes be tricky and time consuming. Particularly
when multiple sections are involved.

This patch adds a column containing the relevant debug_options
SECTION,LEVEL value on each line right after the kidN number for debug
levels 2+.

8 years agoFix missing virtual destructor in Packable API
Alex Rousskov [Tue, 11 Aug 2015 05:35:08 +0000 (22:35 -0700)] 
Fix missing virtual destructor in Packable API

8 years agoTLS: fix various bugs in HTTPS proxying context creation
Amos Jeffries [Tue, 11 Aug 2015 04:41:55 +0000 (21:41 -0700)] 
TLS: fix various bugs in HTTPS proxying context creation

cache_peer with "ssl" option and DIRECT HTTPS outgoing traffic was
not having TLS context initialized at all. Resulting in TLS outgoing
being disabled unless explicit extra options were used.

With this patch:

The default squid.conf sets "tls_outgoing_options min-version=1.0".
Which auto-enables DIRECT outgoing, the new explicit "disable" option
is required to turn off.

http_port ... protocol=HTTPS and https_port forces
"encryptTransport=true;" explicitly based on the expected protocol. So
it is either enabled by the parse() call when TLS options are used, or
forced on anyway later when the protocol is validated.

icaps:// services also explicitly set "encryptTransport=true;"
explicitly based on 's' in the service URI scheme.

The cache_peer requires a minimum of "ssl" option to be configured. Any
use of TLS/SSL options other than "disable" will enable TLS to the peer.

In summary TLS should be:

* default-on for all https_port, icaps:// services, and outgoing
https:// traffic.

* manually enabled on cache_peer and http_port.

* manually disabled on outgoing https:// traffic.

8 years agoSourceFormat Enforcement
Source Maintenance [Tue, 11 Aug 2015 00:12:10 +0000 (00:12 +0000)] 
SourceFormat Enforcement

8 years agoReject non-chunked HTTP messages with conflicting Content-Length values.
Alex Rousskov [Mon, 10 Aug 2015 21:23:12 +0000 (15:23 -0600)] 
Reject non-chunked HTTP messages with conflicting Content-Length values.

Squid used to trust and forward the largest Content-Length header. This
behavior violated an RFC 7230 MUST in Section 3.3.3 item #4. It also confused
some ICAP services and probably some HTTP agents. Squid now refuses to forward
the badly framed message to the ICAP service and HTTP agent, responding with
an HTTP 411 or 502 (depending on the message direction) error instead.

This is a quick-and-dirty implementation. A polished version should reject
responses with invalid Content-Length values as well (per RFC 7230 MUST) and
should behave the same regardless of the relaxed_header_parser setting (this
is not a header parsing issue).

8 years agoReplace use of String in ProcessRoles() with SBuf
Amos Jeffries [Sun, 9 Aug 2015 10:14:38 +0000 (03:14 -0700)] 
Replace use of String in ProcessRoles() with SBuf

8 years agoRemove unused SBUF_SOURCE from parser/Makefile
Amos Jeffries [Fri, 7 Aug 2015 04:52:00 +0000 (21:52 -0700)] 
Remove unused SBUF_SOURCE from parser/Makefile

8 years agoRemove always-true checks in HttpHdrCc (CID 1315405, 1315406)
Francesco Chemolli [Thu, 6 Aug 2015 18:55:29 +0000 (20:55 +0200)] 
Remove always-true checks in HttpHdrCc (CID 13154051315406)

8 years agoSourceFormat Enforcement
Source Maintenance [Thu, 6 Aug 2015 12:12:11 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoMerge coverity-fixes - HttpHeader refactor
Francesco Chemolli [Thu, 6 Aug 2015 07:30:15 +0000 (09:30 +0200)] 
Merge coverity-fixes - HttpHeader refactor

8 years agoImplement operator<<(ostream,Http::HttpHdr) merge-candidate-3-v2
Francesco Chemolli [Thu, 6 Aug 2015 02:50:14 +0000 (04:50 +0200)] 
Implement operator<<(ostream,Http::HttpHdr)

8 years agoImplement operator<<(ostream, HttpHdrCc
Francesco Chemolli [Wed, 5 Aug 2015 21:11:09 +0000 (23:11 +0200)] 
Implement operator<<(ostream, HttpHdrCc

8 years agoFix formatting
Francesco Chemolli [Wed, 5 Aug 2015 16:56:42 +0000 (18:56 +0200)] 
Fix formatting

8 years agoFix typo
Francesco Chemolli [Wed, 5 Aug 2015 16:42:20 +0000 (18:42 +0200)] 
Fix typo

8 years agoTighten and rationalize checks on HTTP headers' validity.
Francesco Chemolli [Wed, 5 Aug 2015 16:30:48 +0000 (18:30 +0200)] 
Tighten and rationalize checks on HTTP headers' validity.
Remove operator<<(Http::HeaderType) as it's not accepted by clang.

8 years agoRename http_hdr_cc_type to HttpHdrCcType and reference it by full qualifier.
Francesco Chemolli [Wed, 5 Aug 2015 13:47:19 +0000 (15:47 +0200)] 
Rename http_hdr_cc_type to HttpHdrCcType and reference it by full qualifier.
Remove module cleanup functions for HttpHeader, HttpHdrCc, HttpHdrSc.
Remove useless includes.
Rename Http::any_registered_header to Http::any_HdrType_enum_value.
Remove useless assert()s in HttpHeaderEntry dtor and HttpHeader::parse.
Clarify documentation for Http::HeaderLookupTable

8 years agoShuffled more methods into namespace Http, renamed headerTable according to conventions.
Francesco Chemolli [Tue, 4 Aug 2015 21:04:09 +0000 (23:04 +0200)] 
Shuffled more methods into namespace Http, renamed headerTable according to conventions.

8 years agorenamed field_type to Http::HdrFieldType
Francesco Chemolli [Tue, 4 Aug 2015 20:12:39 +0000 (22:12 +0200)] 
renamed field_type to Http::HdrFieldType

8 years agoRenamed http_hdr_type to Http::HdrType, fixed some HdrType-int implicit conversions
Francesco Chemolli [Tue, 4 Aug 2015 19:57:07 +0000 (21:57 +0200)] 
Renamed http_hdr_type to Http::HdrType, fixed some HdrType-int implicit conversions

8 years agoFix http_hdr_type layering constraint violations in external_acl.cc
Francesco Chemolli [Tue, 4 Aug 2015 16:23:20 +0000 (18:23 +0200)] 
Fix http_hdr_type layering constraint violations in external_acl.cc

8 years agoShuffle HeaderLookupTable to RegisteredHeaders.{h,cc}
Francesco Chemolli [Tue, 4 Aug 2015 14:58:58 +0000 (16:58 +0200)] 
Shuffle HeaderLookupTable to RegisteredHeaders.{h,cc}

8 years agoReview: shuffle enums from enums.h to specific headers.
Francesco Chemolli [Tue, 4 Aug 2015 14:32:37 +0000 (16:32 +0200)] 
Review: shuffle enums from enums.h to specific headers.

8 years agoMerged from trunk merge-candidate-3-v1
Francesco Chemolli [Tue, 4 Aug 2015 11:09:58 +0000 (13:09 +0200)] 
Merged from trunk

8 years agoSource formatting
Francesco Chemolli [Tue, 4 Aug 2015 11:09:31 +0000 (13:09 +0200)] 
Source formatting

8 years agoFix bug in HDR_OTHER parsing; refactor valid-header checks to be more generic
Francesco Chemolli [Tue, 4 Aug 2015 10:50:30 +0000 (12:50 +0200)] 
Fix bug in HDR_OTHER parsing; refactor valid-header checks to be more generic

8 years agoClean up
Francesco Chemolli [Tue, 4 Aug 2015 10:15:12 +0000 (12:15 +0200)] 
Clean up

8 years agoBoilerplate: update ignored files
Amos Jeffries [Tue, 4 Aug 2015 05:32:35 +0000 (22:32 -0700)] 
Boilerplate: update ignored files

8 years agoBoilerplate: add Foundation details to rfcnb and smblib documentation files
Amos Jeffries [Tue, 4 Aug 2015 02:40:16 +0000 (19:40 -0700)] 
Boilerplate: add Foundation details to rfcnb and smblib documentation files

We had hoped to be removing this old library code by now. But it appears
that there is no alternative and users are still requesting the helpers
that depend on them.

8 years agoRemoved httpHeaderIdByNameDef, small cleanups
Francesco Chemolli [Mon, 3 Aug 2015 13:56:30 +0000 (15:56 +0200)] 
Removed httpHeaderIdByNameDef, small cleanups

8 years agoRemoved HttpHeaderFieldInfo and related methods
Francesco Chemolli [Mon, 3 Aug 2015 10:40:17 +0000 (12:40 +0200)] 
Removed HttpHeaderFieldInfo and related methods

8 years agoMigrate HttpHdrCc to LookupTable.
Francesco Chemolli [Mon, 3 Aug 2015 10:27:49 +0000 (12:27 +0200)] 
Migrate HttpHdrCc to LookupTable.

8 years agoFix fakeAConnectRequest() missing after rev.14206
Amos Jeffries [Mon, 3 Aug 2015 09:36:20 +0000 (02:36 -0700)] 
Fix fakeAConnectRequest() missing after rev.14206

8 years agoCleanup: de-duplicate fake-CONNECT code
Amos Jeffries [Mon, 3 Aug 2015 09:15:27 +0000 (02:15 -0700)] 
Cleanup: de-duplicate fake-CONNECT code

Over the course of the peek-n-splice development and followup patches
the code generating fake CONNECT requests to tunnel various intercepted
traffic has been copy-n-pasted several times.

Add a new method fakeAConnectRequest() that takes a debug reason and
SBuf containing any payload to preserve from the original I/O buffer.

8 years agoUse automake subdir-objects feature
Amos Jeffries [Mon, 3 Aug 2015 03:50:25 +0000 (20:50 -0700)] 
Use automake subdir-objects feature

Now that there are no longer cross-directory collisions in the built
binaries or libraries we can enable this feature from ./configure
instead of on a per-Makefile basis

8 years agoFix distclean file left after rev.14203
Amos Jeffries [Mon, 3 Aug 2015 03:44:59 +0000 (20:44 -0700)] 
Fix distclean file left after rev.14203

8 years agoPlace unit tests in src/tests to make automake happy
Amos Jeffries [Mon, 3 Aug 2015 02:08:22 +0000 (19:08 -0700)] 
Place unit tests in src/tests to make automake happy

The auto* toolchain warns that automake future versions
will be enablign aubdir-objects mechanism by default.

Some unit tests were moved into per-library subdirs
with the plan of keeping all convenience library code
together. However the current layout state of Squid
means that most still require some objects in other
libraries or at the top level. This does not build
happily with the auto-tools subdir-objects feature.
In particular the distclean target has a tendency
to erase objects twice and die on the second attempt.

Temporarily undo that SourceLayout shuffing in order
to be more compatible with automake 1.1n versions.

8 years agoRemove dead code from HttpHdrSc.cc
Francesco Chemolli [Sun, 2 Aug 2015 19:40:58 +0000 (21:40 +0200)] 
Remove dead code from HttpHdrSc.cc

8 years agoReimplemented Surrogate-Control lookup as LookupTable, removed httpHeaderNameById
Francesco Chemolli [Sun, 2 Aug 2015 18:06:48 +0000 (20:06 +0200)] 
Reimplemented Surrogate-Control lookup as LookupTable, removed httpHeaderNameById

8 years agoTurn field_type into a strongly-typed enum
Francesco Chemolli [Sun, 2 Aug 2015 15:09:46 +0000 (17:09 +0200)] 
Turn field_type into a strongly-typed enum

8 years agoMerged from trunk
Francesco Chemolli [Sat, 1 Aug 2015 15:35:37 +0000 (17:35 +0200)] 
Merged from trunk

8 years agoBug 4293: wrong SNI sent to server after URL-rewrite
Alex Wu [Sat, 1 Aug 2015 03:50:37 +0000 (20:50 -0700)] 
Bug 4293: wrong SNI sent to server after URL-rewrite

8 years agoFix 'large transactions are getting stuck' since rev.14093
Amos Jeffries [Sat, 1 Aug 2015 02:22:12 +0000 (19:22 -0700)] 
Fix 'large transactions are getting stuck' since rev.14093

Packer removal of packerClean() also removed several implicit uses of
StoreEntry::flush() without adding an explicit call in their place.

All users of StoreEntry::buffer() must follow it with a call to
StoreEntry:flush() to release the buffering and output the buffer
contents.

8 years agoSourceLayout: move CacheMgr typedef OBJH to mgr/forward.h
Amos Jeffries [Sat, 1 Aug 2015 02:13:13 +0000 (19:13 -0700)] 
SourceLayout: move CacheMgr typedef OBJH to mgr/forward.h

8 years agoMore 3.5.7 ChangeLog
Amos Jeffries [Fri, 31 Jul 2015 21:01:05 +0000 (14:01 -0700)] 
More 3.5.7 ChangeLog

8 years agoPrep for 3.5.7 and 3.4.14
Amos Jeffries [Fri, 31 Jul 2015 20:57:07 +0000 (13:57 -0700)] 
Prep for 3.5.7 and 3.4.14

8 years agoAdd forgotten http/RegisteredHeaders.cc
Francesco Chemolli [Fri, 31 Jul 2015 19:37:37 +0000 (21:37 +0200)] 
Add forgotten http/RegisteredHeaders.cc

8 years agoMerged from trunk
Francesco Chemolli [Fri, 31 Jul 2015 19:26:52 +0000 (21:26 +0200)] 
Merged from trunk

8 years agoUpdated TODO
Francesco Chemolli [Fri, 31 Jul 2015 15:05:22 +0000 (17:05 +0200)] 
Updated TODO

8 years agoMoved headerTable and related enums to RegisteredHeaders.cc
Francesco Chemolli [Fri, 31 Jul 2015 14:42:48 +0000 (16:42 +0200)] 
Moved headerTable and related enums to RegisteredHeaders.cc

8 years agoMoved some users of httpHeaderIdByNameDef to the SBuf variant
Francesco Chemolli [Fri, 31 Jul 2015 14:14:34 +0000 (16:14 +0200)] 
Moved some users of httpHeaderIdByNameDef to the SBuf variant

8 years agoRemoved HeadersAttrs table, moved header statistics to headerStatsTable.
Francesco Chemolli [Fri, 31 Jul 2015 14:05:05 +0000 (16:05 +0200)] 
Removed HeadersAttrs table, moved header statistics to headerStatsTable.

8 years agoMigrate Http Header Fields stats to headerStatsTable
Francesco Chemolli [Fri, 31 Jul 2015 12:53:39 +0000 (14:53 +0200)] 
Migrate Http Header Fields stats to headerStatsTable

8 years agoComment out dead code, start using LookupTable for HttpHeader lookups.
Francesco Chemolli [Fri, 31 Jul 2015 10:28:59 +0000 (12:28 +0200)] 
Comment out dead code, start using LookupTable for HttpHeader lookups.

8 years agobasic_smb_auth: rejecting valid credentials
Unknown - Debian Project [Fri, 31 Jul 2015 06:26:38 +0000 (23:26 -0700)] 
basic_smb_auth: rejecting valid credentials

basic_smb_auth.sh delivers the credentials via environment in
a form "$USER%$PASSWORD", which is not expected from smbclient. This seem to
result from an obsolete or inferior documentation of smbclient. While it is
perfectly valid to deliver the credentials in this form via commandline
parameter -U, for example in

  smbclient //domain_controller/NETLOGON -d 0 -E -W windows_domain -c "get
  proxyauth -" -U herrmann%mysecurepassword 2>/dev/null

this form is not valid, when the credentials will be delivered via environment.

Via environment the credentials must be delivered in two separate variables
  USER=$USER%
  PASSWD=$PASSWORD.

8 years agobasic_smb_auth: doesn't handle passwords with backslashes
Jeff Licquia [Fri, 31 Jul 2015 06:22:11 +0000 (23:22 -0700)] 
basic_smb_auth: doesn't handle passwords with backslashes

 From; Jeff Licquia <jlicquia@scinet.springfieldclinic.com>
 Subject; squid: SMB auth proxy has problems with some passwords
 Date; Tue, 18 Jul 2000 12:45:01 -0500 (CDT)

The SMB authenticator doesn't handle passwords with backslashes in them
correctly.  The fix appears to be easy; just put a -r in the "read SMBPASS"
line in smb_auth.sh.

8 years agobasic_smb_auth: nmblookup fails when smb.conf contaisn WINS servers
John M Cooper [Fri, 31 Jul 2015 06:16:51 +0000 (23:16 -0700)] 
basic_smb_auth: nmblookup fails when smb.conf contaisn WINS servers

 From; John M Cooper
 To; Debian Bug Tracking System
 Subject; squid: smb_auth does not work with a wins server defined in smb.conf
 Date; 28 Jan 2002 17:46:13 +0000

If you define a wins server in the file /etc/samba/smb.conf then the
smb_auth script gets the wrong Domain Controller IP address.

There should be a change to mb_auth.sh at line 50

basically adding in the extra "\..+" stops the number of Wins servers
from being returned from the nmblookup command.

8 years agoDocs: fix man(8) page syntax for lexgrof tool
Amos Jeffries [Fri, 31 Jul 2015 04:49:36 +0000 (21:49 -0700)] 
Docs: fix man(8) page syntax for lexgrof tool

8 years agoCleanup: urlParseProtocol() is unused outside url.cc
Amos Jeffries [Fri, 31 Jul 2015 00:16:40 +0000 (17:16 -0700)] 
Cleanup: urlParseProtocol() is unused outside url.cc

8 years agoAdd todo list, re-add HDR_OTHER, implement parallel lookup, shuffle HDR_BAD_HDR at...
Francesco Chemolli [Thu, 30 Jul 2015 15:01:46 +0000 (17:01 +0200)] 
Add todo list, re-add HDR_OTHER, implement parallel lookup, shuffle HDR_BAD_HDR at end of enum list

8 years agoCheck invariant on HttpHeader.cc:headerTable at startup
Francesco Chemolli [Thu, 30 Jul 2015 13:06:23 +0000 (15:06 +0200)] 
Check invariant on HttpHeader.cc:headerTable at startup

8 years agoLookupTable must be case-insensitive
Francesco Chemolli [Thu, 30 Jul 2015 12:35:58 +0000 (14:35 +0200)] 
LookupTable must be case-insensitive

8 years agoImplement modular LookupTable and use it for HttpHeader.cc:headerTable.
Francesco Chemolli [Thu, 30 Jul 2015 09:19:13 +0000 (11:19 +0200)] 
Implement modular LookupTable and use it for HttpHeader.cc:headerTable.

8 years agoSourceFormat Enforcement
Source Maintenance [Wed, 29 Jul 2015 18:12:16 +0000 (18:12 +0000)] 
SourceFormat Enforcement

8 years agoStart converting HttpHeader.cc to LookupTable
Francesco Chemolli [Wed, 29 Jul 2015 17:23:49 +0000 (19:23 +0200)] 
Start converting HttpHeader.cc to LookupTable

8 years agoMerged from trunk
Francesco Chemolli [Wed, 29 Jul 2015 13:33:12 +0000 (15:33 +0200)] 
Merged from trunk

8 years agoImplement std::hash<SBuf> for seamless std::unordered_map<SBuf,*> integration
Francesco Chemolli [Wed, 29 Jul 2015 13:30:50 +0000 (15:30 +0200)] 
Implement std::hash<SBuf> for seamless std::unordered_map<SBuf,*> integration

8 years agoMoved std::hash<SBuf> from SBuf.h to SBufAlgos.h
Francesco Chemolli [Wed, 29 Jul 2015 13:27:15 +0000 (15:27 +0200)] 
Moved std::hash<SBuf> from SBuf.h to SBufAlgos.h

8 years agoRemoved whitespace in unit test
Francesco Chemolli [Wed, 29 Jul 2015 12:31:56 +0000 (14:31 +0200)] 
Removed whitespace in unit test

8 years agoSourceFormat Enforcement
Source Maintenance [Wed, 29 Jul 2015 12:12:14 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoSourceLayout: refactor regex pattern objects
Amos Jeffries [Wed, 29 Jul 2015 07:11:17 +0000 (00:11 -0700)] 
SourceLayout: refactor regex pattern objects

* moves the regex pattern state storage to class RegexPattern
  in base/RegexPattern.h which is MEMPROXY_CLASS pooled and
  constructed with flags and pattern preset.
 - for now the regcomp generated data is set separately.

* Replaces ACL storage class RegexList with a std::list

* converts refresh_pattern regex data to class RegexPattern for
  its pattern and -i/+i flag details.

8 years agoFix libdiskio build with auto-disabled modules
Amos Jeffries [Wed, 29 Jul 2015 03:29:17 +0000 (20:29 -0700)] 
Fix libdiskio build with auto-disabled modules

The squid_disk_module_candidates_* autoconf variable for disabled
disk I/O modules needs to be explicitly set to 'no' to perform the
disabling. Do this for all modules that were not doing so when module
dependencies were broken or absent.

Also, convert the IpcIo module from a hard ERROR, to a soft auto-disable
when SHM support is not present.

8 years agoAdd temporary SBufToCstring() helper functions for SBuf transition
Amos Jeffries [Wed, 29 Jul 2015 00:41:57 +0000 (17:41 -0700)] 
Add temporary SBufToCstring() helper functions for SBuf transition

These functions provide safe replacement for xstrdup() and xstrncpy()
that guarantees 0-termination of the output c-string but do not have
any side effects or behaviour guarantees affecting the source SBuf
internal state.

This lack of side effects is important for the transitional period
where a lot of buffer contents will be copied out of SBuf but are
'read-only' and need to avoid overheads such as the reallocating
twice (or more) that would occur if using SBuf::c_str().

Effective immediately we have a ban on using the xstr*() group of
helper functions to copy data out of SBuf::raw*() accessors. The
xstr*() and all other common system str*() use c-string dependent
operations internally which on non-0-terminated SBuf internals can
result in nasty performance issues (ie. strlen() of 2 MB 'string').

8 years agoFix several other xstrndup() instigated off-by-1 errors
Amos Jeffries [Tue, 28 Jul 2015 15:38:55 +0000 (08:38 -0700)] 
Fix several other xstrndup() instigated off-by-1 errors

8 years agoFix off-by-1 in urlpath_regex
Amos Jeffries [Tue, 28 Jul 2015 15:32:29 +0000 (08:32 -0700)] 
Fix off-by-1 in urlpath_regex

8 years agoSourceFormat Enforcement
Source Maintenance [Tue, 28 Jul 2015 12:12:10 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agomerge coverity-fixes: implement LookupTable
Francesco Chemolli [Tue, 28 Jul 2015 08:12:02 +0000 (10:12 +0200)] 
merge coverity-fixes: implement LookupTable