call quick handler on a dirent subrequest. This fixes a nasty problem in
mod_cache where it was serving up content on a dirent subrequest.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93915 13f79535-47bb-0310-9956-ffa450edef68
the complexity of trying to set the filter chain correctly, with the
side-effect of forcing us to walk the entire chain whenever we add
a filter. Since the filter chains are small, the decrease in
complexity is worth it.
Reviewed by: Allan Edwards
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93745 13f79535-47bb-0310-9956-ffa450edef68
were not getting the correct filters. This is done by creating a location
in the request rec that holds protocol level filters. Protocol level
filters survive for one request, from the time the request is received
from the user to the time the response is sent. r->output_filters now
stores the request level filters, which are only valid for the lifetime
of one request_rec.
This patch works, but it is not complete. The second half of the problem
is that add_any_filter doesn't check where it puts the filters that it
adds, so it is possible for filters to be put on this wrong list, and
for filters to be lost completely during request processing. That half
of the fix will be coming in the next day or so.
Submitted by: Will Rowe, Justin Erenkrantz, Ryan Bloom
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93682 13f79535-47bb-0310-9956-ffa450edef68
present.
showstoppers--
Kudos to Jeff for finding it.
Kudos to BrianP for leading us in the right direction.
Kudos to OtherBill for pointing out the right way to fix this.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93425 13f79535-47bb-0310-9956-ffa450edef68
We would previously receive APR_INCOMPLETE on symlinks if wanted has
FINFO_NAME set because it isn't supported via apr_stat(). Furthermore, we
don't care what the real name is anyway (even if it apr_stat returned
.name) - we want to call it by the name the symlink says it is.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93328 13f79535-47bb-0310-9956-ffa450edef68
working again. Also rounds out our fix to work around negotiated
directories which Greg Ames fixed; this addition in request.c simply
shortcuts all further processing.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93045 13f79535-47bb-0310-9956-ffa450edef68
subrequests
this function has been creating bogus subrequest URIs when there is
path_info for a long time. They didn't matter until fixup_dir started
using them for URI subrequests, which led to a loop with ever growing
bogus internal URIs and filenames.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93035 13f79535-47bb-0310-9956-ffa450edef68
* Change SUBREQ_CORE so that it is a HTTP_HEADER (20) filter instead of a content filter (10)
this allows subrequests to add content filters properly
* Change subreq handling of 'handle-include' so that it splits/passes the brigade before the subreq
is created. (This allows quick_handler to push content back from this phase)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92956 13f79535-47bb-0310-9956-ffa450edef68
which is an APR_DIR, and path_info contents. Also, al la Mr. Pane,
optimize our canonical_filename by simply noting the length of the
identity match, and refresh canonical_filename when we are finished.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92707 13f79535-47bb-0310-9956-ffa450edef68
for an APR_DIR file from the cache when we have path_info, it is a
contradition (APR_DIR always forces dir_walk to gather the next segment
from path_info, even if it is APR_NOFILE, until we have no path_info.)
So we can't use a predetermined filename/path_info combo, ever, if the
filename resolves to an APR_DIR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92706 13f79535-47bb-0310-9956-ffa450edef68
Moved the directory/location/file-walk caches from the
request's pool userdata hash table to the core_request_config
struct.
This change removes about 60% of the processing time from
prep_walk_cache().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92684 13f79535-47bb-0310-9956-ffa450edef68
invoke handler phase, since it can't fail, and contributes nothing
to the request 'character', but everything to it's invocation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92471 13f79535-47bb-0310-9956-ffa450edef68
final target file if check for symlinks reveals it's an APR_LNK, but this
is preferable to the convoluted code required to 'reuse' the original stat.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91822 13f79535-47bb-0310-9956-ffa450edef68
behavior than the old path_info logic.
If the stat() of r->filename succeeds ignore every segment that requires
no symlink check (and on Win32/OS2/Netware the name matches the canonical
name, assuring us that the case/aliases match the true name.)
This optimization can be improved by establishing a second cache of the
actual partial filenames that _are_ tested for symlinks (or canonical
filename case), and then skiping such tests when the conditions match on
successive passes for subrequests or redirects.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91816 13f79535-47bb-0310-9956-ffa450edef68
ap_directory_walk. The strlen calls, in particular, had
ranked as a top bottleneck in the usr-space code in recent
performance profiling.
Submitted by: Brian Pane <bpane@pacbell.net>
Reviewed by: Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91746 13f79535-47bb-0310-9956-ffa450edef68
We need to allocate storage space for the terminating NULL AND the extra /
we may tack on to the string at some point.
How in the hell the stars were aligned for this to corrupt newv via the
strcat at line 580 is unknown.
Resolves segfault seen on daedalus.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91607 13f79535-47bb-0310-9956-ffa450edef68
as well as the /manual/ returning docroot/index. Need to look for another
solution. I'm suspecting path_info is possibly broken.
Reverts 1.68, as suggested by Brian Havard.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91479 13f79535-47bb-0310-9956-ffa450edef68
This can happen if there is a partial match between a bad URI and a
file with a variant extention.
ap_sub_req_lookup_dirent has apparently been generating bogus subrequest
URIs for ages, but they used to be ignored. Once we started calling
ap_process_request_internal for all subrequests, they started causing
problems. Make it explicit that rnew->uri is to be ignored for this type
of subrequest.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91375 13f79535-47bb-0310-9956-ffa450edef68
activated. It may be bumpy for a few days, and we have more optimizations
to put in place, but it's time to get this in the developer's test code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91359 13f79535-47bb-0310-9956-ffa450edef68
I ended up blasting these (intentional) changes as well :(
This finishes up the changes for the new, replacement ap_directory_walk
for testing. This code isn't active yet.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91342 13f79535-47bb-0310-9956-ffa450edef68
doesn't activate that code, I will do so probably by Monday, after more
thorough testing.
Introduces the ap_directory_walk::cache so we can stop wasting tons of
effort in mod_autoindex and other subreq/redirect requests.
This isn't thoroughly tested, I've only stepped through a half dozen
common cases. If you want to play, define REPLACE_PATH_INFO_METHOD.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91340 13f79535-47bb-0310-9956-ffa450edef68
as the parent request. Also pulls a bunch of notes and code that was
set aside, we don't need this with the other optimizations introduced.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91254 13f79535-47bb-0310-9956-ffa450edef68
after deleting the EOS bucket.
This prevents a seg fault in mod_include when the connection dies. There
doesn't seem to be much point in passing empty brigades in general.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91225 13f79535-47bb-0310-9956-ffa450edef68
If we are *already* a faux URI (i.e. relative file sub req) and we then
make a subrequest from that faux URI to a file in the same directory,
we'd try to build a URI out of the fake URI which leads to the wrong
thing happening somewhere down the line. So, let's just give this
special case a fake URI as well.
OtherBill needs to verify this. He can back it out if he wants. I
don't much care. It's one line and it seems okay...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91187 13f79535-47bb-0310-9956-ffa450edef68