]> granicus.if.org Git - apache/commitdiff
Save one call of ap_escape_html on the uri. Reflow code to be more readable.
authorStefan Fritsch <sf@apache.org>
Tue, 20 Sep 2011 20:12:51 +0000 (20:12 +0000)
committerStefan Fritsch <sf@apache.org>
Tue, 20 Sep 2011 20:12:51 +0000 (20:12 +0000)
Submitted by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
PR: 51697

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1173328 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index f10a2b99ee61f54f9c633a0dd796dc22ead44ed3..8f92839205816ded6fee2b75d54e7a6f5efcab31 100644 (file)
@@ -531,16 +531,15 @@ PROXY_DECLARE(void) ap_proxy_sec2hex(int t, char *y)
 
 PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *message)
 {
+    const char *uri = ap_escape_html(r->pool, r->uri);
     apr_table_setn(r->notes, "error-notes",
-    apr_pstrcat(r->pool,
-        "The proxy server could not handle the request "
-        "<em><a href=\"", ap_escape_html(r->pool, r->uri),
-        "\">", ap_escape_html(r->pool, r->method),
-        "&nbsp;",
-        ap_escape_html(r->pool, r->uri), "</a></em>.<p>\n"
-        "Reason: <strong>",
-        ap_escape_html(r->pool, message),
-        "</strong></p>", NULL));
+        apr_pstrcat(r->pool,
+            "The proxy server could not handle the request <em><a href=\"",
+            uri, "\">", ap_escape_html(r->pool, r->method), "&nbsp;", uri,
+            "</a></em>.<p>\n"
+            "Reason: <strong>", ap_escape_html(r->pool, message),
+            "</strong></p>",
+            NULL));
 
     /* Allow "error-notes" string to be printed by ap_send_error_response() */
     apr_table_setn(r->notes, "verbose-error-to", apr_pstrdup(r->pool, "*"));