Commit d7f78eda authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1828920 from trunk:

PR62186: preserve %<m for ErrorDocument internal redirects

  *) core: Preserve the original HTTP request method in the '%<m' LogFormat
     when an path-based ErrorDocument is used.  PR 62186.
     [Micha Lenk <micha lenk.info>]

Submitted By: Micha Lenk
Committed By: covener

Submitted by: covener
Reviewed by: covener, jhriggs, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1830248 13f79535-47bb-0310-9956-ffa450edef68
parent 325c0b37
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.34

  *) core: Preserve the original HTTP request method in the '%<m' LogFormat
     when an path-based ErrorDocument is used.  PR 62186. 
     [Micha Lenk <micha lenk.info>]

  *) mod_remoteip: make proxy-protocol work on slave connections, e.g. in HTTP/2
     requests. See also https://github.com/roadrunner2/mod-proxy-protocol/issues/6
     [Stefan Eissing]
+0 −5
Original line number Diff line number Diff line
@@ -132,11 +132,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) core: restore r->method after internal redirect to errordocument so %<m
     can be logged. PR62186
     trunk patch: https://svn.apache.org/r1828920
     2.4.x patch: svn merge -c 1828920 ^/httpd/httpd/trunk .
     +1: covener, jhriggs, jim


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
+7 −1
Original line number Diff line number Diff line
@@ -186,7 +186,8 @@ static void ap_die_r(int type, request_rec *r, int recursive_error)
            apr_table_setn(r->headers_out, "Location", custom_response);
        }
        else if (custom_response[0] == '/') {
            const char *error_notes;
            const char *error_notes, *original_method;
            int original_method_number;
            r->no_local_copy = 1;       /* Do NOT send HTTP_NOT_MODIFIED for
                                         * error documents! */
            /*
@@ -204,9 +205,14 @@ static void ap_die_r(int type, request_rec *r, int recursive_error)
                                             "error-notes")) != NULL) {
                apr_table_setn(r->subprocess_env, "ERROR_NOTES", error_notes);
            }
            original_method = r->method;
            original_method_number = r->method_number;
            r->method = "GET";
            r->method_number = M_GET;
            ap_internal_redirect(custom_response, r);
            /* preserve ability to see %<m in the access log */
            r->method = original_method;
            r->method_number = original_method_number;
            return;
        }
        else {