1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

205 Commits

Author SHA1 Message Date
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Bill Stoddard
6752a95e45 Move the quick_handler comment to the new quick handler location. Do not
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
2002-03-13 19:41:56 +00:00
Sander Striker
4fc0ba5034 Style Police comming through...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93852 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 09:02:19 +00:00
Ryan Bloom
116497445f Remove the prev pointer from the filter chain. This removes
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
2002-03-07 02:09:30 +00:00
Ryan Bloom
349a0b17e4 Only insert net_filter once per request. Initialize the output
protocol filters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93709 13f79535-47bb-0310-9956-ffa450edef68
2002-03-05 05:24:21 +00:00
Ryan Bloom
596d79f14b This fixes most of the header bug that was committed last night. The server
is seg faulting on pipelined requests currently, but I want to get people
back to a running server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93686 13f79535-47bb-0310-9956-ffa450edef68
2002-03-03 22:04:03 +00:00
Ryan Bloom
9ac46ee310 Fix the mod_dir/mod_negotiation bug, where redirects and sub requests
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
2002-03-03 02:15:52 +00:00
Justin Erenkrantz
4606f607c7 Fix ap_directory_walk() per-dir merge bug seen when no <Directory /> is
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
2002-02-15 07:43:20 +00:00
Justin Erenkrantz
38969cf175 Fix resolve_symlink to save the original symlink name if known.
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
2002-02-07 06:29:57 +00:00
William A. Rowe Jr
011c7375e9 Which PR? I can't count them all. Get QUERY_STRING and PATH_INFO
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
2002-01-27 07:44:07 +00:00
Brian Pane
1bef49daa2 optimization: switched to ap_add_output_filter_handle() for installation of
subreq filter


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93041 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 02:38:45 +00:00
Greg Ames
a84d8fa149 ap_sub_req_lookup_dirent: fix mod_negotiation loop with near infinite
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
2002-01-26 20:16:01 +00:00
Ian Holsman
9387a9974d These changes are to allow caching of subrequests via a quick_handler.
* 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
2002-01-21 01:43:30 +00:00
Ian Holsman
798851f475 code police again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92867 13f79535-47bb-0310-9956-ffa450edef68
2002-01-16 19:14:44 +00:00
Ian Holsman
d2afa1b8c7 sigh.
code style police


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92865 13f79535-47bb-0310-9956-ffa450edef68
2002-01-16 18:12:52 +00:00
Ian Holsman
6dcd25894c quick handler now runs on subrequests as well
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92862 13f79535-47bb-0310-9956-ffa450edef68
2002-01-16 04:29:10 +00:00
William A. Rowe Jr
5de0159432 Merge a singular path for dir_walk to parse, if we have an r->filename
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
2002-01-02 21:58:43 +00:00
William A. Rowe Jr
e88faedf17 Eliminate a duplicate absolute path test, and NEVER serve a request
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
2002-01-02 21:34:50 +00:00
Brian Pane
4d9b06444e Generalized the recent prep_walk_cache optimizations to allow other
modules to register "notes" within the array of working data in
the core_request_config


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92697 13f79535-47bb-0310-9956-ffa450edef68
2002-01-01 20:36:18 +00:00
Brian Pane
199e4864fc Performance fix for prep_walk_cache():
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
2001-12-31 08:18:32 +00:00
William A. Rowe Jr
cf5e402674 Move the insert_filter hook from the prepare request phase to the
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
2001-12-14 03:30:23 +00:00
William A. Rowe Jr
c9e7a80335 . unwind MORE redundant code [wasn't I just here six months ago???]
. fix a redundant return [how no compilers caught a code-not-reachable
    is beyond me :]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92440 13f79535-47bb-0310-9956-ffa450edef68
2001-12-13 02:26:18 +00:00
Justin Erenkrantz
e5214bdf37 Style reformat. Tabs->spaces, etc, etc, etc.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92402 13f79535-47bb-0310-9956-ffa450edef68
2001-12-09 18:08:08 +00:00
Ben Laurie
56fcba71d3 Reduce magic levels.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92401 13f79535-47bb-0310-9956-ffa450edef68
2001-12-09 17:48:52 +00:00
William A. Rowe Jr
51c6b901bf Stat, don't lstat the final target. This means we may double-stat the
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
2001-11-09 16:54:00 +00:00
William A. Rowe Jr
026ed72a2a Reintroduce the 'one stat dir_walk', with singificantly more sensible
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
2001-11-09 08:08:42 +00:00
Justin Erenkrantz
439dcf6e68 This patch optimizes away some strlen and strcat calls in
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
2001-11-04 21:46:36 +00:00
Ken Coar
bb2a524c01 More style-stuff. A lot of this doesn't qualify as 'readable' even so.. :-(
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91721 13f79535-47bb-0310-9956-ffa450edef68
2001-11-01 20:14:16 +00:00
Ken Coar
957f5e40a3 Some style-guide fixes (nothing functional)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91719 13f79535-47bb-0310-9956-ffa450edef68
2001-11-01 16:06:21 +00:00
William A. Rowe Jr
da3ae7591e Use the _setn flavor which will avoid strdup'ing these strings, and
skip the cleanups we don't need.

Submitted by: Brian Pane <bpane@pacbell.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91681 13f79535-47bb-0310-9956-ffa450edef68
2001-10-29 15:19:03 +00:00
Justin Erenkrantz
456b51f0d5 Oh, don't you love buffer overflows?
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
2001-10-20 18:27:15 +00:00
Greg Ames
47ec77ab30 recognize filename subrequests without requiring a null URI. This fixes
a problem with infinite recursion of dirent subrequests.

Submitted by:  Bill Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91525 13f79535-47bb-0310-9956-ffa450edef68
2001-10-17 15:12:13 +00:00
William A. Rowe Jr
5e3b2442bf Fix the little bits o' breakage I introduced with the last two
'theoretical' corrections.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91482 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 02:23:42 +00:00
William A. Rowe Jr
75ed984cc7 directory_walk trounced existing path_info declarations. I suspect _this_
was Greg Ames bug...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91481 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 02:19:42 +00:00
William A. Rowe Jr
940a7786c7 Streamline this function, and append the trailing slash for any directories
that are resolved.  Needs to be more tightly coupled to the dir_walk
  optimized cache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91480 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 02:15:45 +00:00
William A. Rowe Jr
317c6358d8 This will probably fix recent breakage to mod_negotation and httpd.test,
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
2001-10-16 01:57:45 +00:00
William A. Rowe Jr
f1f8494552 Always helps to add the member
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91380 13f79535-47bb-0310-9956-ffa450edef68
2001-10-09 03:15:05 +00:00
William A. Rowe Jr
9f1c799241 Speed it up. While this optimization wasn't obvious for the two-pass
location_walk, it is significant for all subreq/redirects reusing the
  cached walk values.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91378 13f79535-47bb-0310-9956-ffa450edef68
2001-10-09 02:41:47 +00:00
Greg Ames
8dd598a71f prevent near infinite subrequest recursion with mod_negotiation enabled.
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
2001-10-09 01:33:48 +00:00
Greg Ames
9213036eae get symlinks working again
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91371 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 22:07:32 +00:00
Jeff Trawick
b13cb7715c at least *this* cast keeps gcc happy (and should keep
everything else happy as well)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91368 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 21:13:51 +00:00
William A. Rowe Jr
e04108cee2 Revamped ap_directory_walk logic, without a path_info helper is now
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
2001-10-08 17:38:52 +00:00
William A. Rowe Jr
006f49d98a This is nothing but const bogosity. We have our very own manipulation,
we are allowed to touch the char *'s, even if we have a const contract.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91358 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 17:35:41 +00:00
William A. Rowe Jr
526abd74c0 Hmmm... continue's not so good an idea here :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91344 13f79535-47bb-0310-9956-ffa450edef68
2001-10-06 22:47:20 +00:00
William A. Rowe Jr
05cd8ac520 Aaargh! Unwinding part of my patch before I committed the prior version,
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
2001-10-06 22:16:11 +00:00
William A. Rowe Jr
2b9d60f5f5 A major overhaul to the -replacement- ap_directory_walk logic. This still
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
2001-10-06 21:52:29 +00:00
William A. Rowe Jr
e9efbadadb Correct file lookups when we are given a file within the same directory
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
2001-10-03 13:24:28 +00:00
Greg Ames
a119c52846 ap_sub_req_output_filter: don't pass along a brigade if it becomes empty
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
2001-10-01 21:01:14 +00:00
Justin Erenkrantz
d7a730adcf Fix for httpd-test modules/include test #17.
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
2001-09-29 06:54:08 +00:00
William A. Rowe Jr
e748927d17 Optimize file_walk with the same logic as location_walk. Fix both to
have a bit more legibility, and tighter locality of scope for a smaller
  number of variables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91186 13f79535-47bb-0310-9956-ffa450edef68
2001-09-28 19:50:22 +00:00