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

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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1828920 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Covener
2018-04-11 18:49:05 +00:00
parent 5968cd3a3e
commit 5d755688b1
2 changed files with 11 additions and 1 deletions

View File

@@ -1,6 +1,10 @@
-*- coding: utf-8 -*- -*- coding: utf-8 -*-
Changes with Apache 2.5.1 Changes with Apache 2.5.1
*) 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_proxy_balancer: Add hot spare member type and corresponding flag (R). Hot spare members are *) mod_proxy_balancer: Add hot spare member type and corresponding flag (R). Hot spare members are
used as drop-in replacements for unusable workers in the same load balancer set. This differs used as drop-in replacements for unusable workers in the same load balancer set. This differs
from hot standbys which are only used when all workers in a set are unusable. PR 61140. [Jim from hot standbys which are only used when all workers in a set are unusable. PR 61140. [Jim

View File

@@ -187,7 +187,8 @@ static void ap_die_r(int type, request_rec *r, int recursive_error)
apr_table_setn(r->headers_out, "Location", custom_response); apr_table_setn(r->headers_out, "Location", custom_response);
} }
else if (custom_response[0] == '/') { 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 r->no_local_copy = 1; /* Do NOT send HTTP_NOT_MODIFIED for
* error documents! */ * error documents! */
/* /*
@@ -205,9 +206,14 @@ static void ap_die_r(int type, request_rec *r, int recursive_error)
"error-notes")) != NULL) { "error-notes")) != NULL) {
apr_table_setn(r->subprocess_env, "ERROR_NOTES", error_notes); 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 = "GET";
r->method_number = M_GET; r->method_number = M_GET;
ap_internal_redirect(custom_response, r); 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; return;
} }
else { else {