diff --git a/CHANGES b/CHANGES index f49e42b03d..b422730966 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) 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] + *) mod_rewrite: Allow cookies set by mod_rewrite to contain ':' by accepting ';' as an alternate separator. PR47241. [, Eric Covener] diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index d2d075d98b..25e223c337 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -279,11 +279,19 @@ static int fixup_dir(request_rec *r) } 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; } /* 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; }