Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A30E7B41 for ; Tue, 20 Sep 2011 20:13:13 +0000 (UTC) Received: (qmail 48825 invoked by uid 500); 20 Sep 2011 20:13:12 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 48763 invoked by uid 500); 20 Sep 2011 20:13:12 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 48756 invoked by uid 99); 20 Sep 2011 20:13:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 20:13:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Sep 2011 20:13:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C365B238888F; Tue, 20 Sep 2011 20:12:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1173328 - /httpd/httpd/trunk/modules/proxy/proxy_util.c Date: Tue, 20 Sep 2011 20:12:51 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20110920201251.C365B238888F@eris.apache.org> 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 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 " - "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, "*"));