]> granicus.if.org Git - apache/commitdiff
Fix 3xx responses with local URLs as ErrorDocument
authorStefan Fritsch <sf@apache.org>
Sun, 23 Oct 2011 22:07:50 +0000 (22:07 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 23 Oct 2011 22:07:50 +0000 (22:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1187985 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_request.c

diff --git a/CHANGES b/CHANGES
index f5fe1ca59a3eff68c42af30c1c185976da9d2c61..6c015c0db94c478f228d7450432f9d3c8c86ba75 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,9 @@ Changes with Apache 2.3.15
      PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener,
      <lowprio20 gmail.com>]
 
+  *) http: Add missing Location header if local URL-path is used as
+     ErrorDocument for 30x. [Stefan Fritsch]
+
   *) mod_buffer: Make sure we step down for subrequests, but not for internal
      redirects triggered by mod_rewrite. [Graham Leggett]
 
index 0408db193afb2d92d010af9943a6110d99242901..0a25333ee45bb0053ec31cb9a6516d7b73d14fd4 100644 (file)
@@ -459,6 +459,11 @@ static request_rec *internal_internal_redirect(const char *new_uri,
 
     new->headers_in      = r->headers_in;
     new->headers_out     = apr_table_make(r->pool, 12);
+    if (ap_is_HTTP_REDIRECT(new->status)) {
+        const char *location = apr_table_get(r->headers_out, "Location");
+        if (location)
+            apr_table_setn(new->headers_out, "Location", location);
+    }
     new->err_headers_out = r->err_headers_out;
     new->subprocess_env  = rename_original_env(r->pool, r->subprocess_env);
     new->notes           = apr_table_make(r->pool, 5);