Am 16.10.2015 um 19:27 schrieb Eric Covener:
What's with the backwards start and end there?  Does the
successor/predecessor override FIRST/MIDDLE/LAST?

backwards?

successor/predecessor are:

static const char * const autoindex_module[] = { "mod_autoindex.c", NULL };

ap_hook_handler(start_blocking_mod_autoindex, NULL, autoindex_module, APR_HOOK_LAST); ap_hook_handler(end_blocking_mod_autoindex, autoindex_module, NULL, APR_HOOK_FIRST);

Regards,

Rainer

---------- Forwarded message ----------
From:  <[email protected]>
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)
To: [email protected]


https://bz.apache.org/bugzilla/show_bug.cgi?id=58498

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

https://github.com/phusion/passenger/blob/stable-5.0/src/apache2_module/Hooks.cpp

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,
APR_HOOK_LAST);
ap_hook_handler(end_blocking_mod_autoindex, autoindex_module, NULL,
APR_HOOK_FIRST);

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.

Rainer

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
kippdata
informationstechnologie GmbH   Tel: 0228 98549 -0
Bornheimer Str. 33a            Fax: 0228 98549 -50
53111 Bonn                     www.kippdata.de

HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417
Geschäftsführer: Dr. Thomas Höfer, Rainer Jung, Sven Maurmann

Reply via email to