1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1173328 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2011-09-20 20:12:51 +00:00
parent 827743e677
commit 037e42fb4d

View 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) 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_table_setn(r->notes, "error-notes",
apr_pstrcat(r->pool, apr_pstrcat(r->pool,
"The proxy server could not handle the request " "The proxy server could not handle the request <em><a href=\"",
"<em><a href=\"", ap_escape_html(r->pool, r->uri), uri, "\">", ap_escape_html(r->pool, r->method), "&nbsp;", uri,
"\">", ap_escape_html(r->pool, r->method), "</a></em>.<p>\n"
"&nbsp;", "Reason: <strong>", ap_escape_html(r->pool, message),
ap_escape_html(r->pool, r->uri), "</a></em>.<p>\n" "</strong></p>",
"Reason: <strong>", NULL));
ap_escape_html(r->pool, message),
"</strong></p>", NULL));
/* Allow "error-notes" string to be printed by ap_send_error_response() */ /* Allow "error-notes" string to be printed by ap_send_error_response() */
apr_table_setn(r->notes, "verbose-error-to", apr_pstrdup(r->pool, "*")); apr_table_setn(r->notes, "verbose-error-to", apr_pstrdup(r->pool, "*"));