httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <>
Subject Fwd: [Bug 58498] Apache 2.4.17: Regression with mod_autoindex (in combination with Phusion Passenger)
Date Fri, 16 Oct 2015 17:27:27 GMT
What's with the backwards start and end there?  Does the
successor/predecessor override FIRST/MIDDLE/LAST?

---------- Forwarded message ----------
From:  <>
Date: Fri, Oct 16, 2015 at 1:24 PM
Subject: [Bug 58498] Apache 2.4.17: Regression with mod_autoindex (in
combination with Phusion Passenger)

--- Comment #2 from Rainer Jung <> ---
I'm not an expert on passenger, but one can see the hook registration at

scrolling down to the end of the file.

The code in the file contains some handler juggling and also rules for ordering
relative to mod_autoindex. Especially

ap_hook_handler(start_blocking_mod_autoindex, NULL, autoindex_module,
ap_hook_handler(end_blocking_mod_autoindex, autoindex_module, NULL,

points to

DEFINE_REQUEST_HOOK(start_blocking_mod_autoindex, startBlockingModAutoIndex)
DEFINE_REQUEST_HOOK(end_blocking_mod_autoindex, endBlockingModAutoIndex)

which brings the following functions into the game:

        int startBlockingModAutoIndex(request_rec *r) {
                RequestNote *note = getRequestNote(r);
                if (note != 0 && hasModAutoIndex()) {
                        note->handlerBeforeModAutoIndex = r->handler;
                        r->handler = "";
                return DECLINED;

        int endBlockingModAutoIndex(request_rec *r) {
                RequestNote *note = getRequestNote(r);
                if (note != 0 && hasModAutoIndex()) {
                        r->handler = note->handlerBeforeModAutoIndex;
                return DECLINED;

In front of them is a comment:

         * mod_autoindex will try to display a directory index for URIs that
map to a directory.
         * This is undesired because of page caching semantics. Suppose that a
Rails application
         * has an ImagesController which has page caching enabled, and thus
also a 'public/images'
         * directory. When the visitor visits /images we'll want the request to
be forwarded to
         * the Rails application, instead of displaying a directory index.
         * So in this hook method, we temporarily change some fields in the
request structure
         * in order to block mod_autoindex. In endBlockingModAutoIndex(), we
restore the request
         * structure to its former state.

Not sure whether this is related.


You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

Eric Covener

View raw message