fa34f0
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
fa34f0
index e419eb6..dcafa9c 100644
fa34f0
--- a/modules/http/http_protocol.c
fa34f0
+++ b/modules/http/http_protocol.c
fa34f0
@@ -1132,13 +1132,10 @@ static const char *get_canned_error_string(int status,
fa34f0
                            "\">here.

\n",
fa34f0
                            NULL));
fa34f0
     case HTTP_USE_PROXY:
fa34f0
-        return(apr_pstrcat(p,
fa34f0
-                           "

This resource is only accessible "

fa34f0
-                           "through the proxy\n",
fa34f0
-                           ap_escape_html(r->pool, location),
fa34f0
-                           "
\nYou will need to configure "
fa34f0
-                           "your client to use that proxy.

\n",
fa34f0
-                           NULL));
fa34f0
+        return("

This resource is only accessible "

fa34f0
+               "through the proxy\n"
fa34f0
+               "
\nYou will need to configure "
fa34f0
+               "your client to use that proxy.

\n");
fa34f0
     case HTTP_PROXY_AUTHENTICATION_REQUIRED:
fa34f0
     case HTTP_UNAUTHORIZED:
fa34f0
         return("

This server could not verify that you\n"

fa34f0
@@ -1154,34 +1151,20 @@ static const char *get_canned_error_string(int status,
fa34f0
                                   "error-notes",
fa34f0
                                   "

\n"));
fa34f0
     case HTTP_FORBIDDEN:
fa34f0
-        s1 = apr_pstrcat(p,
fa34f0
-                         "

You don't have permission to access ",

fa34f0
-                         ap_escape_html(r->pool, r->uri),
fa34f0
-                         "\non this server.
\n",
fa34f0
-                         NULL);
fa34f0
-        return(add_optional_notes(r, s1, "error-notes", "

\n"));
fa34f0
+        return(add_optional_notes(r, "

You don't have permission to access this resource.", "error-notes", "

\n"));
fa34f0
     case HTTP_NOT_FOUND:
fa34f0
-        return(apr_pstrcat(p,
fa34f0
-                           "

The requested URL ",

fa34f0
-                           ap_escape_html(r->pool, r->uri),
fa34f0
-                           " was not found on this server.

\n",
fa34f0
-                           NULL));
fa34f0
+        return("

The requested URL was not found on this server.

\n");
fa34f0
     case HTTP_METHOD_NOT_ALLOWED:
fa34f0
         return(apr_pstrcat(p,
fa34f0
                            "

The requested method ",

fa34f0
                            ap_escape_html(r->pool, r->method),
fa34f0
-                           " is not allowed for the URL ",
fa34f0
-                           ap_escape_html(r->pool, r->uri),
fa34f0
-                           ".

\n",
fa34f0
+                           " is not allowed for this URL.

\n",
fa34f0
                            NULL));
fa34f0
     case HTTP_NOT_ACCEPTABLE:
fa34f0
-        s1 = apr_pstrcat(p,
fa34f0
-                         "

An appropriate representation of the "

fa34f0
-                         "requested resource ",
fa34f0
-                         ap_escape_html(r->pool, r->uri),
fa34f0
-                         " could not be found on this server.

\n",
fa34f0
-                         NULL);
fa34f0
-        return(add_optional_notes(r, s1, "variant-list", ""));
fa34f0
+        return(add_optional_notes(r, 
fa34f0
+            "

An appropriate representation of the requested resource "

fa34f0
+            "could not be found on this server.

\n",
fa34f0
+            "variant-list", ""));
fa34f0
     case HTTP_MULTIPLE_CHOICES:
fa34f0
         return(add_optional_notes(r, "", "variant-list", ""));
fa34f0
     case HTTP_LENGTH_REQUIRED:
fa34f0
@@ -1192,18 +1175,13 @@ static const char *get_canned_error_string(int status,
fa34f0
                          NULL);
fa34f0
         return(add_optional_notes(r, s1, "error-notes", "

\n"));
fa34f0
     case HTTP_PRECONDITION_FAILED:
fa34f0
-        return(apr_pstrcat(p,
fa34f0
-                           "

The precondition on the request "

fa34f0
-                           "for the URL ",
fa34f0
-                           ap_escape_html(r->pool, r->uri),
fa34f0
-                           " evaluated to false.

\n",
fa34f0
-                           NULL));
fa34f0
+        return("

The precondition on the request "

fa34f0
+               "for this URL evaluated to false.

\n");
fa34f0
     case HTTP_NOT_IMPLEMENTED:
fa34f0
         s1 = apr_pstrcat(p,
fa34f0
                          "

",

fa34f0
-                         ap_escape_html(r->pool, r->method), " to ",
fa34f0
-                         ap_escape_html(r->pool, r->uri),
fa34f0
-                         " not supported.
\n",
fa34f0
+                         ap_escape_html(r->pool, r->method), " ",
fa34f0
+                         " not supported for current URL.
\n",
fa34f0
                          NULL);
fa34f0
         return(add_optional_notes(r, s1, "error-notes", "

\n"));
fa34f0
     case HTTP_BAD_GATEWAY:
fa34f0
@@ -1211,29 +1189,19 @@ static const char *get_canned_error_string(int status,
fa34f0
             "response from an upstream server.
" CRLF;
fa34f0
         return(add_optional_notes(r, s1, "error-notes", "

\n"));
fa34f0
     case HTTP_VARIANT_ALSO_VARIES:
fa34f0
-        return(apr_pstrcat(p,
fa34f0
-                           "

A variant for the requested "

fa34f0
-                           "resource\n
\n",
fa34f0
-                           ap_escape_html(r->pool, r->uri),
fa34f0
-                           "\n\nis itself a negotiable resource. "
fa34f0
-                           "This indicates a configuration error.

\n",
fa34f0
-                           NULL));
fa34f0
+        return("

A variant for the requested "

fa34f0
+               "resource\n
\n"
fa34f0
+               "\n\nis itself a negotiable resource. "
fa34f0
+               "This indicates a configuration error.

\n");
fa34f0
     case HTTP_REQUEST_TIME_OUT:
fa34f0
         return("

Server timeout waiting for the HTTP request from the client.

\n");
fa34f0
     case HTTP_GONE:
fa34f0
-        return(apr_pstrcat(p,
fa34f0
-                           "

The requested resource
",

fa34f0
-                           ap_escape_html(r->pool, r->uri),
fa34f0
-                           "
\nis no longer available on this server "
fa34f0
-                           "and there is no forwarding address.\n"
fa34f0
-                           "Please remove all references to this "
fa34f0
-                           "resource.

\n",
fa34f0
-                           NULL));
fa34f0
+        return("

The requested resource is no longer available on this server"

fa34f0
+               " and there is no forwarding address.\n"
fa34f0
+               "Please remove all references to this resource.

\n");
fa34f0
     case HTTP_REQUEST_ENTITY_TOO_LARGE:
fa34f0
         return(apr_pstrcat(p,
fa34f0
-                           "The requested resource
",
fa34f0
-                           ap_escape_html(r->pool, r->uri), "
\n",
fa34f0
-                           "does not allow request data with ",
fa34f0
+                           "The requested resource does not allow request data with ",
fa34f0
                            ap_escape_html(r->pool, r->method),
fa34f0
                            " requests, or the amount of data provided in\n"
fa34f0
                            "the request exceeds the capacity limit.\n",
fa34f0
@@ -1317,11 +1285,9 @@ static const char *get_canned_error_string(int status,
fa34f0
                "the Server Name Indication (SNI) in use for this\n"
fa34f0
                "connection.

\n");
fa34f0
     case HTTP_UNAVAILABLE_FOR_LEGAL_REASONS:
fa34f0
-        s1 = apr_pstrcat(p,
fa34f0
-                         "

Access to ", ap_escape_html(r->pool, r->uri),

fa34f0
-                         "\nhas been denied for legal reasons.
\n",
fa34f0
-                         NULL);
fa34f0
-        return(add_optional_notes(r, s1, "error-notes", "

\n"));
fa34f0
+        return(add_optional_notes(r, 
fa34f0
+               "

Access to this URL has been denied for legal reasons.
\n",

fa34f0
+               "error-notes", "

\n"));
fa34f0
     default:                    /* HTTP_INTERNAL_SERVER_ERROR */
fa34f0
         /*
fa34f0
          * This comparison to expose error-notes could be modified to
fa34f0
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
fa34f0
index 800ede1..de48735 100644
fa34f0
--- a/modules/proxy/mod_proxy.c
fa34f0
+++ b/modules/proxy/mod_proxy.c
fa34f0
@@ -1055,9 +1055,10 @@ static int proxy_handler(request_rec *r)
fa34f0
         char *end;
fa34f0
         maxfwd = apr_strtoi64(str, &end, 10);
fa34f0
         if (maxfwd < 0 || maxfwd == APR_INT64_MAX || *end) {
fa34f0
-            return ap_proxyerror(r, HTTP_BAD_REQUEST,
fa34f0
-                    apr_psprintf(r->pool,
fa34f0
-                            "Max-Forwards value '%s' could not be parsed", str));
fa34f0
+            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO() 
fa34f0
+                          "Max-Forwards value '%s' could not be parsed", str);
fa34f0
+            return ap_proxyerror(r, HTTP_BAD_REQUEST, 
fa34f0
+                          "Max-Forwards request header could not be parsed");
fa34f0
         }
fa34f0
         else if (maxfwd == 0) {
fa34f0
             switch (r->method_number) {
fa34f0
diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c
fa34f0
index 4a10987..8f6f853 100644
fa34f0
--- a/modules/proxy/mod_proxy_ftp.c
fa34f0
+++ b/modules/proxy/mod_proxy_ftp.c
fa34f0
@@ -1024,8 +1024,9 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
fa34f0
     /* We break the URL into host, port, path-search */
fa34f0
     if (r->parsed_uri.hostname == NULL) {
fa34f0
         if (APR_SUCCESS != apr_uri_parse(p, url, &uri)) {
fa34f0
-            return ap_proxyerror(r, HTTP_BAD_REQUEST,
fa34f0
-                apr_psprintf(p, "URI cannot be parsed: %s", url));
fa34f0
+            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO() 
fa34f0
+                          "URI cannot be parsed: %s", url);
fa34f0
+            return ap_proxyerror(r, HTTP_BAD_REQUEST, "URI cannot be parsed");
fa34f0
         }
fa34f0
         connectname = uri.hostname;
fa34f0
         connectport = uri.port;
fa34f0
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
fa34f0
index 6501c68..0bbfa59 100644
fa34f0
--- a/modules/proxy/proxy_util.c
fa34f0
+++ b/modules/proxy/proxy_util.c
fa34f0
@@ -368,12 +368,9 @@ PROXY_DECLARE(char *)
fa34f0
 
fa34f0
 PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *message)
fa34f0
 {
fa34f0
-    const char *uri = ap_escape_html(r->pool, r->uri);
fa34f0
     apr_table_setn(r->notes, "error-notes",
fa34f0
         apr_pstrcat(r->pool,
fa34f0
-            "The proxy server could not handle the request 
fa34f0
-            uri, "\">", ap_escape_html(r->pool, r->method), " ", uri,
fa34f0
-            ".

\n"

fa34f0
+            "The proxy server could not handle the request

"

fa34f0
             "Reason: ", ap_escape_html(r->pool, message),
fa34f0
             "

",
fa34f0
             NULL));