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

2022-07-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61355

--- Comment #15 from fel...@felipegasper.com ---
Pull request with my last suggestion:

https://github.com/apache/httpd/pull/325

Also note that https://bz.apache.org/bugzilla/show_bug.cgi?id=59267 reports a
similar issue.

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



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

2022-07-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61355

--- Comment #14 from fel...@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-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org