You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Raymond S Brand <rs...@rsbx.net> on 1999/12/05 18:34:58 UTC

Patches to mod_autoindex and mod_include to fix include variables

Attached are 2 alternative diffs to finish implementing server-parsed
mod_autoindex Header and Readme files in apache_1.3. A third diff is
attached that shows the differences between the alternatives.

Why this is needed: With an unpatched apache_1.3.9, the include variables
DOCUMENT_NAME, DOCUMENT_PATH_INFO, DOCUMENT_URI, LAST_MODIFIED,
SCRIPT_NAME, and SERVER_PROTOCOL will have values reflecting the Header
or Readme files instead of the directory. Contrast this with the use of
included files in a non directory document where those include variables
reflect the base document, not the included file.

Both alternatives work with and without various pool/memory
allocation/deallocation debugging options enabled and using various
compiler optimization levels on Linux. Alternative 0 has been in use for
the last 6 months (without the ap_table_unset's in mod_autoindex) using
apache_1.3.7-dev (downloaded 19990504) without problems.

Two alternatives are presented because Dean did not think that alternative
0 was safe 6 months ago. I believe that it is and it provides a cleaner
method for module authors to use the power and flexibility of mod_include
to enhance generated content, like mod_autoindex.


Thanks

Raymond S Brand