You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2014/07/12 16:52:08 UTC

svn commit: r1609938 - in /httpd/httpd/trunk: CHANGES modules/http/http_protocol.c

Author: trawick
Date: Sat Jul 12 14:52:08 2014
New Revision: 1609938

URL: http://svn.apache.org/r1609938
Log:
Include any error notes set by modules in the canned error
response for 403 errors.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http/http_protocol.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1609938&r1=1609937&r2=1609938&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sat Jul 12 14:52:08 2014
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) core: Include any error notes set by modules in the canned error
+     response for 403 errors.  [Jeff Trawick]
+
   *) mod_ssl: Set an error note for requests rejected due to
      SSLStrictSNIVHostCheck.  [Jeff Trawick]
 

Modified: httpd/httpd/trunk/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_protocol.c?rev=1609938&r1=1609937&r2=1609938&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_protocol.c (original)
+++ httpd/httpd/trunk/modules/http/http_protocol.c Sat Jul 12 14:52:08 2014
@@ -1139,11 +1139,12 @@ static const char *get_canned_error_stri
                                   "error-notes",
                                   "</p>\n"));
     case HTTP_FORBIDDEN:
-        return(apr_pstrcat(p,
-                           "<p>You don't have permission to access ",
-                           ap_escape_html(r->pool, r->uri),
-                           "\non this server.</p>\n",
-                           NULL));
+        s1 = apr_pstrcat(p,
+                         "<p>You don't have permission to access ",
+                         ap_escape_html(r->pool, r->uri),
+                         "\non this server.<br />\n",
+                         NULL);
+        return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
     case HTTP_NOT_FOUND:
         return(apr_pstrcat(p,
                            "<p>The requested URL ",