Commit 3a0ecc54 authored by Eric Covener's avatar Eric Covener
Browse files

backport http://svn.apache.org/r1695583 from trunk:

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
parent 3cc5d817
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

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

+0 −7
Original line number Diff line number Diff line
@@ -125,13 +125,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
     +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 ]

+8 −0
Original line number Diff line number Diff line
@@ -276,10 +276,18 @@ static int fixup_dir(request_rec *r)

    /* 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;
    }