This patch is generated from the errorpages branch of HEAD in squid Sun Sep 16 00:19:11 2007 GMT See http://devel.squid-cache.org/ Index: squid/errors/English/generic diff -u squid/errors/English/generic:1.2 squid/errors/English/generic:1.2.68.1 --- squid/errors/English/generic:1.2 Thu Jul 18 17:00:46 2002 +++ squid/errors/English/generic Sun Sep 2 05:18:10 2007 @@ -1,6 +1,6 @@ -ERROR: The requested URL could not be retrieved +@title@

ERROR

@@ -14,18 +14,9 @@ -

-The system returned: -

    %E
- -

-This means that: -

-    @LONG_DESCRIPTION@
-
-

+@long_description@ Index: squid/errors/English/templates/ERR_ACCESS_DENIED diff -u /dev/null squid/errors/English/templates/ERR_ACCESS_DENIED:1.1.2.2 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_ACCESS_DENIED Sun Sep 2 05:19:13 2007 @@ -0,0 +1,15 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Access Denied. +[/short_description] + +[long_description] +

+Access control configuration prevents your request from +being allowed at this time. Please contact your service provider if +you feel this is incorrect. +

+[/long_escription] Index: squid/errors/English/templates/ERR_CACHE_ACCESS_DENIED diff -u /dev/null squid/errors/English/templates/ERR_CACHE_ACCESS_DENIED:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_CACHE_ACCESS_DENIED Sun Sep 2 04:53:55 2007 @@ -0,0 +1,21 @@ +[title] +ERROR: Cache Access Denied +[/title] + +[short_description] +Cache Access Denied. +[/short_description] + +[long_description] +

Sorry, you are not currently allowed to request: +

    %U
+from this cache until you have authenticated yourself. +

+

+You need to use Netscape version 2.0 or greater, or Microsoft Internet +Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please +contact the cache administrator if you have +difficulties authenticating yourself or here +change your default password. +

+[/long_description] Index: squid/errors/English/templates/ERR_CACHE_MGR_ACCESS_DENIED diff -u /dev/null squid/errors/English/templates/ERR_CACHE_MGR_ACCESS_DENIED:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_CACHE_MGR_ACCESS_DENIED Sun Sep 2 04:53:55 2007 @@ -0,0 +1,20 @@ +[title] +ERROR: Cache Manager Access Denied +[/title] + +[short_description] +Cache Manager Access Denied. +[/short_description] + +[long_description] +

Sorry, you are not currently allowed to request: +

    %U
+from this cache manager until you have authenticated yourself. +

+

You need to use Netscape version 2.0 or greater, or Microsoft Internet +Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please +contact the cache administrator if you have +difficulties authenticating yourself or, if you are the +administrator, read Squid documentation on cache manager interface and check +cache log for more detailed error messages.

+[/long_description] Index: squid/errors/English/templates/ERR_CANNOT_FORWARD diff -u /dev/null squid/errors/English/templates/ERR_CANNOT_FORWARD:1.1.2.2 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_CANNOT_FORWARD Sun Sep 2 05:19:13 2007 @@ -0,0 +1,19 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Unable to forward this request at this time. +[/short_description] + +[long_description] +

+This request could not be forwarded to the origin server or to any +parent caches. The most likely cause for this error is that: +

+ +[/long_description] Index: squid/errors/English/templates/ERR_CONNECT_FAIL diff -u /dev/null squid/errors/English/templates/ERR_CONNECT_FAIL:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_CONNECT_FAIL Sun Sep 2 04:53:55 2007 @@ -0,0 +1,15 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Connection to %I Failed +[/short_description] + +[long_description] +

+The system returned: +

    %E
+

+The remote host or network may be down. Please try the request again. +[/long_description] Index: squid/errors/English/templates/ERR_DNS_FAIL diff -u /dev/null squid/errors/English/templates/ERR_DNS_FAIL:1.1.2.2 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_DNS_FAIL Sun Sep 2 05:19:13 2007 @@ -0,0 +1,22 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Unable to determine IP address from host name for %H +[/short_description] + +[long_description] +

+The dnsserver returned: +

+
+%z +
+

+This means that: +

+ The cache was not able to resolve the hostname presented in the URL. 
+ Check if the address is correct. 
+
+[/long_description] Index: squid/errors/English/templates/ERR_FORWARDING_DENIED diff -u /dev/null squid/errors/English/templates/ERR_FORWARDING_DENIED:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FORWARDING_DENIED Sun Sep 2 04:53:56 2007 @@ -0,0 +1,14 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Forwarding Denied. +[/short_description] + +[long_description] +

+This cache will not forward your request because it is trying to enforce a +sibling relationship. Perhaps the client at %i is a cache which has been +misconfigured. +[/long_description] Index: squid/errors/English/templates/ERR_FTP_DISABLED diff -u /dev/null squid/errors/English/templates/ERR_FTP_DISABLED:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_DISABLED Sun Sep 2 04:53:56 2007 @@ -0,0 +1,11 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +FTP is Disabled +[/short_description] + +[long_description] +This cache does not support FTP. +[/long_description] Index: squid/errors/English/templates/ERR_FTP_FAILURE diff -u /dev/null squid/errors/English/templates/ERR_FTP_FAILURE:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_FAILURE Sun Sep 2 04:53:56 2007 @@ -0,0 +1,15 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +There was a unexpected reply to an FTP command. +[/short_description] + +[long_description] +Squid sent the following FTP command: +

%f
+and then received this reply +
%F
+
%g
+[/long_description] Index: squid/errors/English/templates/ERR_FTP_FORBIDDEN diff -u /dev/null squid/errors/English/templates/ERR_FTP_FORBIDDEN:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_FORBIDDEN Sun Sep 2 04:53:56 2007 @@ -0,0 +1,15 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +An FTP authentication failure occurred while trying to retrieve the URL. +[/short_description] + +[long_description] +Squid sent the following FTP command: +
%f
+and then received this reply +
%F
+
%g
+[/long_description] Index: squid/errors/English/templates/ERR_FTP_NOT_FOUND diff -u /dev/null squid/errors/English/templates/ERR_FTP_NOT_FOUND:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_NOT_FOUND Sun Sep 2 04:53:56 2007 @@ -0,0 +1,19 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +The requested FTP file could not be found. +[/short_description] + +[long_description] +Squid sent the following FTP command: +
%f
+and then received this reply +
%F
+
%g
+

+This might be caused by an FTP URL with an absolute path (which does +not comply with RFC 1738). If this is the cause, then the file +can be found at %B. +[/long_description] Index: squid/errors/English/templates/ERR_FTP_PUT_CREATED diff -u /dev/null squid/errors/English/templates/ERR_FTP_PUT_CREATED:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_PUT_CREATED Sun Sep 2 04:53:56 2007 @@ -0,0 +1,11 @@ +[title] +FTP PUT Successful: File Created +[/title] + +[short_description] +Operation successful +[/short_description] + +[long_description] +File created. +[/long_description] Index: squid/errors/English/templates/ERR_FTP_PUT_ERROR diff -u /dev/null squid/errors/English/templates/ERR_FTP_PUT_ERROR:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_PUT_ERROR Sun Sep 2 04:53:56 2007 @@ -0,0 +1,23 @@ +[title] +ERROR: FTP upload failed +[/title] + +[short_description] +FTP PUT/upload failed +[/short_description] + +[long_description] +Squid sent the following FTP command: +


+        %f
+
+and then received this reply +

+        %F
+
+

+This means that: +

+Check path, permissions, diskspace and try again.
+
+[/long_description] Index: squid/errors/English/templates/ERR_FTP_PUT_MODIFIED diff -u /dev/null squid/errors/English/templates/ERR_FTP_PUT_MODIFIED:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_PUT_MODIFIED Sun Sep 2 04:53:57 2007 @@ -0,0 +1,11 @@ +[title] +FTP PUT Successful: File updated +[/title] + +[short_description] +Operation successful +[/short_description] + +[long_description] +File updated +[/long_description] Index: squid/errors/English/templates/ERR_FTP_UNAVAILABLE diff -u /dev/null squid/errors/English/templates/ERR_FTP_UNAVAILABLE:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_FTP_UNAVAILABLE Sun Sep 2 04:53:57 2007 @@ -0,0 +1,15 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +The FTP server was too busy while trying to retrieve the URL. +[/short_description] + +[long_description] +Squid sent the following FTP command: +
%f
+and then received this reply +
%F
+
%g
+[/long_description] Index: squid/errors/English/templates/ERR_INVALID_REQ diff -u /dev/null squid/errors/English/templates/ERR_INVALID_REQ:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_INVALID_REQ Sun Sep 2 04:53:57 2007 @@ -0,0 +1,20 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Invalid Request (%R) +[/short_description] + +[long_description] +

+Some aspect of the HTTP Request is invalid. Possible problems: +

+[/long_description] Index: squid/errors/English/templates/ERR_INVALID_RESP diff -u /dev/null squid/errors/English/templates/ERR_INVALID_RESP:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_INVALID_RESP Sun Sep 2 04:53:57 2007 @@ -0,0 +1,15 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Invalid Response (%R) +[/short_description] + +[long_description] +

+The HTTP Response message received from the contacted server +could not be understood or was otherwise malformed. Please contact +the site operator. Your cache administrator may be able to provide +you with more details about the exact nature of the problem if needed. +[/long_description] Index: squid/errors/English/templates/ERR_INVALID_URL diff -u /dev/null squid/errors/English/templates/ERR_INVALID_URL:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_INVALID_URL Sun Sep 2 04:53:57 2007 @@ -0,0 +1,17 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Invalid URL +[/short_description] + +[long_description] +Some aspect of the requested URL is incorrect. Possible problems: +

+[/long_description] Index: squid/errors/English/templates/ERR_LIFETIME_EXP diff -u /dev/null squid/errors/English/templates/ERR_LIFETIME_EXP:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_LIFETIME_EXP Sun Sep 2 04:53:57 2007 @@ -0,0 +1,12 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Connection Lifetime Expired +[/short_description] + +[long_description] +Squid has terminated the request because it has exceeded the maximum +connection lifetime. +[/long_description] Index: squid/errors/English/templates/ERR_NO_RELAY diff -u /dev/null squid/errors/English/templates/ERR_NO_RELAY:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_NO_RELAY Sun Sep 2 04:53:57 2007 @@ -0,0 +1,11 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +No Wais Relay +[/short_description] + +[long_description] +There is no WAIS Relay host defined for this Cache! Yell at the administrator. +[/long_description] Index: squid/errors/English/templates/ERR_ONLY_IF_CACHED_MISS diff -u /dev/null squid/errors/English/templates/ERR_ONLY_IF_CACHED_MISS:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_ONLY_IF_CACHED_MISS Sun Sep 2 04:53:57 2007 @@ -0,0 +1,14 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Valid document was not found in the cache and only-if-cached +directive was specified. +[/short_description] + +[long_description] +You have issued a request with a only-if-cached cache control +directive. The document was not found in the cache, or it required +revalidation prohibited by only-if-cached directive. +[/long_description] Index: squid/errors/English/templates/ERR_READ_ERROR diff -u /dev/null squid/errors/English/templates/ERR_READ_ERROR:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_READ_ERROR Sun Sep 2 04:53:58 2007 @@ -0,0 +1,16 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Read Error +[/short_description] + +[long_description] +

+The system returned: +

    %E
+

+An error condition occurred while reading data from the network. Please +retry your request. +[/long_description] Index: squid/errors/English/templates/ERR_READ_TIMEOUT diff -u /dev/null squid/errors/English/templates/ERR_READ_TIMEOUT:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_READ_TIMEOUT Sun Sep 2 04:53:58 2007 @@ -0,0 +1,16 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Read Timeout +[/short_description] + +[long_description] +

+The system returned: +

    %E
+

+A Timeout occurred while waiting to read data from the network. The network +or server may be down or congested. Please retry your request. +[/long_description] Index: squid/errors/English/templates/ERR_SHUTTING_DOWN diff -u /dev/null squid/errors/English/templates/ERR_SHUTTING_DOWN:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_SHUTTING_DOWN Sun Sep 2 04:53:58 2007 @@ -0,0 +1,13 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +This Squid cache is shutting down. +[/short_description] + +[long_description] +This cache is in the process of shutting down and can not +service your request at this time. Please retry your +request again soon. +[/long_description] Index: squid/errors/English/templates/ERR_SOCKET_FAILURE diff -u /dev/null squid/errors/English/templates/ERR_SOCKET_FAILURE:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_SOCKET_FAILURE Sun Sep 2 04:53:58 2007 @@ -0,0 +1,16 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Socket Failure +[/short_description] + +[long_description] +

+The system returned: +

    %E
+

+Squid is unable to create a TCP socket, presumably due to excessive load. +Please retry your request. +[/long_description] Index: squid/errors/English/templates/ERR_TOO_BIG diff -u /dev/null squid/errors/English/templates/ERR_TOO_BIG:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_TOO_BIG Sun Sep 2 04:54:01 2007 @@ -0,0 +1,16 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +The request or reply is too large. +[/short_description] + +[long_description] +If you are making a POST or PUT request, then your request body +(the thing you are trying to upload) is too large. If you are +making a GET request, then the reply body (what you are trying +to download) is too large. These limits have been established +by the Internet Service Provider who operates this cache. Please +contact them directly if you feel this is an error. +[/long_description] Index: squid/errors/English/templates/ERR_UNSUP_REQ diff -u /dev/null squid/errors/English/templates/ERR_UNSUP_REQ:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_UNSUP_REQ Sun Sep 2 04:54:01 2007 @@ -0,0 +1,13 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Unsupported Request Method and Protocol +[/short_description] + + +[long_description] +Squid does not support all request methods for all access protocols. +For example, you can not POST a Gopher request. +[/long_description] Index: squid/errors/English/templates/ERR_URN_RESOLVE diff -u /dev/null squid/errors/English/templates/ERR_URN_RESOLVE:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_URN_RESOLVE Sun Sep 2 04:54:01 2007 @@ -0,0 +1,11 @@ +[title] +ERROR: The requested URN not be retrieved +[title] + +[short_description] +Cannot Resolve URN +[/short_description] + +[long_description] +Hey, don't expect too much from URNs on %T :) +[/long_description] Index: squid/errors/English/templates/ERR_WRITE_ERROR diff -u /dev/null squid/errors/English/templates/ERR_WRITE_ERROR:1.1.2.2 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_WRITE_ERROR Sun Sep 2 05:20:13 2007 @@ -0,0 +1,18 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Write Error +[/short_description] + +[long_description] +

+The system returned: +

+
    %E
+ +

+An error condition occurred while writing to the network. Please retry your +request. +[/long_description] Index: squid/errors/English/templates/ERR_ZERO_SIZE_OBJECT diff -u /dev/null squid/errors/English/templates/ERR_ZERO_SIZE_OBJECT:1.1.2.2 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/errors/English/templates/ERR_ZERO_SIZE_OBJECT Sun Sep 2 05:20:13 2007 @@ -0,0 +1,13 @@ +[title] +ERROR: The requested URL could not be retrieved +[/title] + +[short_description] +Zero Sized Reply +[/short_description] + +[long_description] +

+ Squid did not receive any data for this request. +

+[/long_description] Index: squid/scripts/BuildErrorPages diff -u /dev/null squid/scripts/BuildErrorPages:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/scripts/BuildErrorPages Sun Sep 2 05:28:11 2007 @@ -0,0 +1,16 @@ +#!/bin/sh + +# $Id$ + +# Adrian Chadd + +if [ "$1" = "" ]; then + echo "ERROR: please supply an errorpage directory with a 'generic' template and a templates/ subdirectory." + exit 127 +fi + +for i in `ls $1/templates/ERR*`; do + ERRFILE="`basename $i`" + echo "Error page: $ERRFILE" + ./ErrorPage.pl $1/generic $1/templates/$ERRFILE $1/$ERRFILE +done Index: squid/scripts/ErrorPage.pl diff -u /dev/null squid/scripts/ErrorPage.pl:1.1.2.1 --- /dev/null Thu Jan 1 01:00:00 1970 +++ squid/scripts/ErrorPage.pl Sun Sep 2 05:17:20 2007 @@ -0,0 +1,63 @@ +#!/usr/bin/perl -w + +# Written by Adrian Chadd + +# $Id + +use strict; +use IO::File; + +if (scalar @ARGV < 3) { + print "Usage: