You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/09/20 22:12:51 UTC
svn commit: r1173328 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
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 <ch...@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),
- " ",
- 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), " ", 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, "*"));