httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1173328 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Tue, 20 Sep 2011 20:12:51 GMT
Author: sf
Date: Tue Sep 20 20:12:51 2011
New Revision: 1173328

URL: http://svn.apache.org/viewvc?rev=1173328&view=rev
Log:
Save one call of ap_escape_html on the uri. Reflow code to be more readable.

Submitted by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
PR: 51697

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1173328&r1=1173327&r2=1173328&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Tue Sep 20 20:12:51 2011
@@ -531,16 +531,15 @@ PROXY_DECLARE(void) ap_proxy_sec2hex(int
 
 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, "*"));



Mime
View raw message