mod_dir: when we bail out of fixups, make sure Content-Type is not still
httpd/unix-directory. This only happens when the generator sets
no content-type which is more common w/ no DefaultType in 2.4.
Submitted By: covener
Reviewed By: ylavic, niq
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1698384 13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.4.17
+ *) mod_dir: Prevent the internal identifier "httpd/unix-directory" from
+ appearing as a Content-Type response header when requests for a directory
+ are rewritten by mod_rewrite. [Eric Covener]
Changes with Apache 2.4.16
+1: jailletc36, ylavic, niq
jailletc36: A CHANGE entry should be added. I forgot it :(
- *) mod_dir: when we bail out of fixups, make sure Content-Type is not still
- httpd/unix-directory. This only happens when the generator sets
- no content-type which is more common w/ no DefaultType in 2.4.
- trunk: http://svn.apache.org/r1695583
- 2.4.x: trunk works
- +1: covener, ylavic, niq
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
/* we're running between mod_rewrites fixup and its internal redirect handler, step aside */
if (!strcmp(r->handler, REWRITE_REDIRECT_HANDLER_NAME)) {
+ /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */
+ if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) {
+ r->content_type = NULL;
+ }
return DECLINED;
}
if (d->checkhandler == MODDIR_ON && strcmp(r->handler, DIR_MAGIC_TYPE)) {
+ /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */
+ if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) {
+ r->content_type = NULL;
+ }
return DECLINED;
}