From: Stefan Fritsch Date: Tue, 20 Sep 2011 20:12:51 +0000 (+0000) Subject: Save one call of ap_escape_html on the uri. Reflow code to be more readable. X-Git-Tag: 2.3.15~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=037e42fb4d320aa8abc21beb1089ee4e009e680d;p=apache Save one call of ap_escape_html on the uri. Reflow code to be more readable. Submitted by: Christophe JAILLET PR: 51697 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1173328 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index f10a2b99ee..8f92839205 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -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 " - "pool, r->uri), - "\">", ap_escape_html(r->pool, r->method), - " ", - ap_escape_html(r->pool, r->uri), ".

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

", NULL)); + apr_pstrcat(r->pool, + "The proxy server could not handle the request ", ap_escape_html(r->pool, r->method), " ", uri, + ".

\n" + "Reason: ", ap_escape_html(r->pool, message), + "

", + 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, "*"));