You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2022/07/26 19:30:41 UTC

[Bug 61355] DirectorySlash directive should use protocol in X-Forwarded-Proto header when available

https://bz.apache.org/bugzilla/show_bug.cgi?id=61355

--- Comment #14 from felipe@felipegasper.com ---
What about just making DirectorySlash output a relative Location, rather than
an absolute one?

-----
diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c
index d13babf818..b5b26bb68e 100644
--- a/modules/mappers/mod_dir.c
+++ b/modules/mappers/mod_dir.c
@@ -292,8 +292,8 @@ static int fixup_dir(request_rec *r)
                                 "/", NULL);
         }

-        apr_table_setn(r->headers_out, "Location",
-                       ap_construct_url(r->pool, ifile, r));
+        apr_table_setn(r->headers_out, "Location", ifile);
+
         return HTTP_MOVED_PERMANENTLY;
     }
-----

That way there’s no change to http_scheme() and thus no effect elsewhere.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org