From: Eric Covener Date: Wed, 11 Apr 2018 18:49:05 +0000 (+0000) Subject: PR62186: preserve %] 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 --- diff --git a/CHANGES b/CHANGES index f3d8e69eb6..3ce88899e4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.1 + *) core: Preserve the original HTTP request method in the '%] + *) 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 from hot standbys which are only used when all workers in a set are unusable. PR 61140. [Jim diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 6e6e35c7d3..bb28d9c8dd 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -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); } 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! */ /* @@ -205,9 +206,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 %method = original_method; + r->method_number = original_method_number; return; } else {