We will note the end result of the merge, and if remains the same through
the second pass, we have nothing whatsoever to do :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90714 13f79535-47bb-0310-9956-ffa450edef68
amount of redundant effort (it must be run twice, but it will no
longer reparse all <Location > blocks when the request uri
hadn't changed.)
The location walk block is refactored, with some significant changes
in variable names for legibility. Cooler still, it uses pool data
instead of 'notes' for the important cache info :)
Note the patch builds the <Location > per dir config from _nothing_,
and then merges it into the per_dir_config. When the underlying
per_dir_config changes between passes, the location_walk can simply
tack back on this preconstruct onto the new per_dir_config.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90713 13f79535-47bb-0310-9956-ffa450edef68
ap_directory_walk() phase. Modules that want to use special
walk logic should refer to the mod_proxy map_to_location example,
with it's proxy_walk and proxysection implementation. This makes
either directory_walk flavor much more legible, since that phase
only runs against real <Directory > blocks.
On a technical note, this patch also forces the Directory to be
canonical (unless it is "/" or a regex.) It also allows us to
be more explicit when declaring <Directory > block errors.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90684 13f79535-47bb-0310-9956-ffa450edef68
the directory_walk and file_walk for non-file requests. TRACE
shortcut moved to http_protocol.c as APR_HOOK_MIDDLE, and the
directory_walk/file_walk happen as APR_HOOK_VERY_LAST in core.c.
A seperate patch to mod_proxy is required to short circuit both the
TRACE and directory_walk/file_walk stuff. That patch is next.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90665 13f79535-47bb-0310-9956-ffa450edef68
out the last patch before I rearranged this to be _readable_.
Next step for everyone's sanity, provide <Proxy > directives ;)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90646 13f79535-47bb-0310-9956-ffa450edef68
This patch does one thing, it changes the root path "/" to reflect an
element count of Zero (0). directory_walk will always accept the zero
element (which sorts first, thankfully) on it's first go around.
So, Unix will accept "/" when it's parsing it's first element "/".
Dos/Win32 will accept "/" and "C:/" when they parse their first element,
"C:/". The root sorted first, so it behaves as users expect.
The syntax "//" or "//machine" will be depreciated for now, the user
needs to set up the extact "//machine/share/" that they want served
on Win32.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90644 13f79535-47bb-0310-9956-ffa450edef68
Therefore we will canonicalize it when it doesn't match filename.
The next optimization should take the path common to canonical_filename
and filename, and start merging filename from there for canonicalization.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90591 13f79535-47bb-0310-9956-ffa450edef68
consuming on all but *nix systems) we temporarily canonicalize to compare
the results of the many merges, and fail on a mismatch.
The apr_filepath_merge and ap_server_root_relative calls now merge the
file _by canonicalizing it_. That includes resolving all /../, /./,
and // misnomers.
A minor effort is required to figure out who all munges the r->filename
in an inappropriate manner.
The final (return to optimized state) probably involves setting an
r->goodname argument to r->filename, every time we properly merge
through ap_server_root_relative or apr_filepath_merge().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90573 13f79535-47bb-0310-9956-ffa450edef68
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by: Cody Sherr <csherr@covalent.net> and
Ryan Morgan <rmorgan@covalent.net>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
by calling ap_allow_options() before setting rnew->per_dir_config.
This is the "easy looking" fix but might have side effects of which I'm
unaware... please double-check this change for correctness.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89978 13f79535-47bb-0310-9956-ffa450edef68
we are in a file subrequest (think of a file server-status sitting in
the document root, this shouldn't be blindly served as a 'file'.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89934 13f79535-47bb-0310-9956-ffa450edef68
a genuine bug...
The old logic
if (!(opts & OPT_SYM_OWNER | OPT_SYM_LINKS))
wouldn't seem to work properly. I think it would act like
if (!((opts & OPT_SYM_OWNER) | OPT_SYM_LINKS))
This clearly isn't intended since OPT_SYM_LINKS is a constant non-zero, such
that we never really fail invalid parameters.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89860 13f79535-47bb-0310-9956-ffa450edef68
the new resolve_symlink (also used by the new directory_walk)
especially for performance and readability. Left check_symlinks
in the soon-to-be-gone get_path_info flavor of directory_walk.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89856 13f79535-47bb-0310-9956-ffa450edef68
check_symlinks, in a protected define REPLACE_PATH_INFO_METHOD.
This allows others to work on vetting, caching, etc, while keeping
the existing logic stable till it's sufficiently optimal for beta.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89847 13f79535-47bb-0310-9956-ffa450edef68
fill_in_sub_req_vars function to propogate the rnew values, but doesn't
yet hook it in. Note that there are two discrepancies, apparently
pretty bad ones, that have been moved after the 'common code' so the
next patch becomes pretty simple.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89441 13f79535-47bb-0310-9956-ffa450edef68
and add an ap_sub_req_lookup_dirent() to create a subrequest from the
results of an apr_dir_read() for mod_negotiation and mod_autoindex.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89437 13f79535-47bb-0310-9956-ffa450edef68
having private data in the wrong (i.e., subrequest) pool, leading to
a segfault later in processing the main request
in the patch posted on new-httpd, the temporary brigade was allocated from
the connection pool; the committed code allocates the brigade from the
main-request pool, as suggested by Ian Holsman
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89284 13f79535-47bb-0310-9956-ffa450edef68
a request while it is being created. This hook is called for all
request_rec's, main request, sub request, and internal redirect.
When this hook is called, the the r->main, r->prev, r->next
pointers have been set, so modules can determine what kind of
request this is.
Currently, this is only used by the core module, but protocol modules
are going to need to have the ability to affect the request while it is
being read.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88532 13f79535-47bb-0310-9956-ffa450edef68