Commit caf61abc authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

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
parent cf626898
Loading
Loading
Loading
Loading
+7 −8
Changes for modules/proxy/proxy_util.c: 7 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -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));
            "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, "*"));