- Change default invalidation behaviour to match recommended behaviour in RFC.
- Ensure URLs from Location and Content-Location headers are absolute before
trying to find their associated objects in the store.
Author: Marin Stavrev <mstavrev@gmail.com>
Fix bug in ZPH parent/sibling hit marking.
When a peer (parent or sibling) hit was detected the TOS was changed using
the local hit TOS marking (zph_tos_local) value instead of the one
configured in the zph_tos_peer parameter.
- Use bool instead of int for urlIsRelative.
- Document what leads to a NULL return in urlMakeAbsolute.
- Declare variables closer to where they're used.
- Fix indentation.
- Split urlAbsolute into urlIsRelative and urlMakeAbsolute.
- Make urlIsRelative compliant with the RFC as to what defines a relative URL.
- Rework purgeEntriesByHeader to be a little easier on the eyes.
Rework urlAbsolute to be a little more streamlined.
The primary aim of this is to cut down on the number of ways snprintf was
called in the original version. The idea here is to build the common base
portion of the url using snprintf and then construct the rest using str[n]cpy.
snprintf is still used as the alternative (using only POSIX routines) involves
a much longer run of code that, at least in my estimation, gains us very little
over snprintf.
- Switch the default from not purging if the method is unknown to purging if
the method is unknown.
- When purging URIs sourced from Location and Content-Location headers, make
sure the URL is absolute before a) comparing it to see if hosts match and b)
actually trying to find it in the store.
Amos Jeffries [Wed, 27 Aug 2008 13:01:36 +0000 (01:01 +1200)]
Author: Benno Rice <benno@squid-cache.org>
Respect $(MAKE) in error translation build.
On FreeBSD, make is not GNU make. GNU make can be installed from ports, but it
is installed as gmake, not make. This makes it vital that Makefiles that wish
to work on FreeBSD always invoke make with $(MAKE) instead of make. The recent
error translation stuff did not follow this, and thus the build broke on
FreeBSD.
Amos Jeffries [Mon, 25 Aug 2008 13:40:16 +0000 (01:40 +1200)]
Author: Francesco Chemolli <kinkie@squid-cache.org>
TestBed: Fix layer-01 permutation options
This patch addresses three related issues:
- makes the error messages for those cases more informative
- changes some (echo + exit) sequences into AC_MSG_ERROR() standard autoconf macros
- changes the layer-01 test options so that it doesn't invoke invalid configure options
Henrik Nordstrom [Wed, 13 Aug 2008 03:19:05 +0000 (05:19 +0200)]
GCC 4.3 changed semantics of "extern inline" to that of C99 (same as inline),
but we assume GNU GCC semantics. This sets the needed attribute to tell GCC
to continue using GNU GCC semantics on this function.
Amos Jeffries [Tue, 12 Aug 2008 12:59:50 +0000 (00:59 +1200)]
Polish translation mechanism
Adds an automatic test for po2html binary and only attempts translation
if one is located.
The po2html path can be specified using: --with-po2html=/path/po2html
Amos Jeffries [Tue, 12 Aug 2008 12:12:37 +0000 (00:12 +1200)]
Author: Francesco Salvestrini and Dustin J. Mitchell
Extend configure with ax_with_prog
Locates an installed program binary, placing the result in the precious
variable VARIABLE. Accepts a present VARIABLE, then --with-program, and
failing that searches for program in the given path (which defaults to
the system path). If program is found, VARIABLE is set to the full path
of the binary; if it is not found VARIABLE is set to VALUE-IF-NOT-FOUND
if provided, unchanged otherwise.
NOTE: This macro is based upon the original AX_WITH_PYTHON macro from
Dustin J. Mitchell <dustin@cs.uchicago.edu>.
COPYLEFT
Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu>
Amos Jeffries [Sun, 10 Aug 2008 05:49:14 +0000 (23:49 -0600)]
Fix: cppunit tests broken by squid.h defines
In order to promote safe coding and the use of internal accounting API
Squid mangles certain common function definitions such as malloc/calloc.
While this is a great idea for Squid internal code. It's not good when
integrating external cppunit macro libraries. At least one of which in
use performs its own allocation during testing.
This adds an extra layer of protection to prevent redirection with certain
unit-tests where the macros needed clash with Squid.
Amos Jeffries [Sat, 9 Aug 2008 06:24:33 +0000 (18:24 +1200)]
Bug 2379: obsolete dns_testnames option
Removes the dns_testnames squid.conf option and all related code.
Obsoletes -D command line option which existed only for the purpose of
turning dns_testnames off. Scheduled for absolute removal in Squid
3.2. But should be assumed as non-existing from 3.1 onwards.
Amos Jeffries [Sat, 9 Aug 2008 05:59:55 +0000 (17:59 +1200)]
Error page auto-negotiation.
* Converts error_directory squid.conf option into an optional override.
Providing backward compatibility with older configurations and local
customizations.
* Adds error_default_language to administratively set the backup
language presented by Squid.
* Fixes design of previously broken hard-coded failover language.
WAS: default to FreeBSD error install location. Hidden by
error_directory being required.
NOW: failover to build-time configured errors/ directory 'English'
templates.
* Adds --enable-auto-locale configure option to enable the following.
* Adds logic to locate visitors most-preferred of available languages
and present a tailored error page as their reply.
Amos Jeffries [Fri, 8 Aug 2008 07:55:02 +0000 (19:55 +1200)]
Preserve old translators details
We are going to remove the old translations as they are upgraded.
But its probably worth keeping the record of who worked on them as the
new work may be derived information.
Amos Jeffries [Fri, 8 Aug 2008 07:30:09 +0000 (19:30 +1200)]
Fix shell issue on translation output
Seems not only does sed on BSD use different regexp parameters but has a
different pattern set as well. The output HTML may look nasty without
cleaning but if the cleaning goes badly it can make the visual end-product
look worse. In this case spurious 'n' characters around the page.
Dropping the sed-based cleanup entirely in favor of usable pages.
Amos Jeffries [Wed, 6 Aug 2008 10:12:37 +0000 (22:12 +1200)]
Append squid signature to tempates for translation
- Appends the squid signature to each template.
The .PO to html conversion was closing each page off anyway
- Updates dictionary and .PO to new text.
- signature is bound by a "footer" class object for display disabling if
needed.