Optimize location_walk. We build an array of incremental matches, and
on attempting a subreq/redirect or simply a second pass, and for each
match in series, if the section is a match, we reuse the merge result
for that section.
Ryan Bloom [Thu, 6 Sep 2001 15:04:01 +0000 (15:04 +0000)]
I am veto'ing this, for now at least. I will support making mod_gz
a separate sub-project of httpd, and possibly rolling it into a later
release of 2.0, but now is not the time to do this.
I didn't crawl the list looking for the complete set of votes, but here we
go. Nominally, this issue would be under "lazy approval" since no changes
are made to APIs, directives, or significant size changes in the runtime.
However, the nature of the discussions effectively calls for "consensus
approval" -- three binding +1 votes and no vetoes.
Ryan Bloom [Tue, 4 Sep 2001 22:32:56 +0000 (22:32 +0000)]
If the user doesn't specify a layout, then just use the Apache
layout. This means that we don't have to re-specify options that are
already in config.layout.
Fix breakage from Brian Pane's util_filter switch to hash tables.
There were some places that were expecting what you put into frec
would be what frec->name would be. Not true anymore.
There are enough other places that were already doing the strcasecmp
that it makes more sense to just make it all strcasecmp across the
board rather than changing the UPPERCASE to lowercase.
(None of these with the exception of old_filter look to be in the
critical path anyway...)
The ap_add_input_filter/ap_add_output_filter functions do an O(n) scan
through the list of registered filters. This patch replaces the linear
list with a hash table for better performance.
Submitted by: Brian Pane <bpane@pacbell.net>
Reviewed by: Justin Erenkrantz
Ryan Bloom [Tue, 4 Sep 2001 01:38:01 +0000 (01:38 +0000)]
Back out the 1.45 change to util_script.c. This change made
us set the environment variable REQUEST_URI to the redirected
URI, instead of the originally requested URI.
Added a little more detail to the docs based on some comments from Bill
Rowe. More to come, but this clarified a point that I had to track
down earlier, and may save someone some time.
Ryan Bloom [Mon, 3 Sep 2001 03:07:42 +0000 (03:07 +0000)]
Fix the interaction between --prefix and --with-layout. We were
over-writing the specified prefix during --with-layout processing. By
keeping a copy of the specified prefix, and resetting it after the
layout processing, this is fixed.
PR: 7755
- Remove extra include_module line - dunno how that got there.
- make lazy_eval_sentinel a const
- create #define for &lazy_eval_sentinel (LAZY_VALUE)
- create get_include_var function (get, check, get real value if lazy)
- cleanup the printenv call to be a bit more streamlined (can't use
get_include_var here since it is iterating through the table here -
well, you could do that, but I won't...)
Make mod_include check for BYTE_COUNT_THRESHOLD on a per-bucket basis
rather than on a per-character basis. A significant amount of time
was spent checking the limit. A better place to check for the threshold
is when we read the bucket in not as we read each character in the bucket.
If a bucket manages to be 200MB, it is not this code's problem as it
is a mere filter.
I ran this with the mod_include stuff in httpd-test and it looks good
from here.
Submitted by: Brian Pane <bpane@pacbell.net>
Reviewed by: Justin Erenkrantz, Ryan Bloom, Greg Stein, Cliff Woolley,
Paul Reder, etc, etc, etc...
After some consideration - Location walk is always required (before and
after any other map_to_storage operations.) Therefore, initialize any
NULL r->per_dir_config at this phase (the earliest necessary point.)
We hadn't prepared for this possibility that someone didn't set up the
r->per_dir_config (which the subreq's didn't). Since we are first in
line, we will handle it if need be.
These no longer work, and even though most of this whole
<IfModule mod_proxy.c> section doesn't work today, at least
get the syntax right for <Proxy > blocks.
Can it be this simple? No, probably not, but this fast-hack will get
us going again for a while.
We are currently rejecting some internal file_sub_req()'s in the
translate phase. I don't like this hack because of risks it potentially
exposes, but for today, if we have a filename - and we are a subrequest,
then let it fly without further mapping. This allows us to serve up
the default "/" request (run through mod_dir->mod_negotiation->mod_mime)
without a 400 error. The right solution is to set up some traps and
escapes for the subreq mechanism, possibly with a subreq translate hook,
and drop the URI entirely for these cases.
David Reid [Fri, 31 Aug 2001 09:47:53 +0000 (09:47 +0000)]
With my normal sense of missing the boat :)
This gets the build working on BeOS again :) Apologies for the delay :(
Jeff changed the order of apr-util and apr to solve a "cleaning" issue but
that makes me uncomfortable as apr-util is dependant on apr, so if we clean
apr-util we shouldn't be altering anything in apr. If I decide to rebuild
apr-util then apr should still be buildable. Sorry Jeff but I think we need
a different solution :(
Cliff Woolley [Fri, 31 Aug 2001 05:05:58 +0000 (05:05 +0000)]
As I understand it, this test is supposed to read like so:
----------------------------------------------------
if the base paths are the same
if (strncmp(rnew->filename, fdir, fdirlen) == 0
and there's more stuff in the new filename than just the base path
&& rnew->filename[fdirlen]
and that stuff contains no slashes
&& ap_strchr_c(rnew->filename + fdirlen, '/') == NULL)
----------------------------------------------------
Assuming that's a correct translation, which I believe to be the case
(and which also seems to jive with the previous version of the test),
then that first part darned well better check == 0, as opposed to != 0.
strncmp returns 0 when they match. =-)
And voila,
"All tests successful, 1 test skipped."
is the result from httpd-test
Now that stinks, sorry. In moving code - I didn't notice my code
now served out (r) info instead of the (rnew) info. Made for nasty
cyclic loops in mod_dir :(
It looks like this works once again. I'll post completed deltas to
the list ASAP.
Move the ap_run_insert_filters to consistently occur in
ap_process_request_internal. This allows the sub_req handler
to alter the filters before the subreq is actually run.
Normalize all paths to run the same, common code for pre-request setup
from the primary request, redirects and sub-requests.
This will significantly reduce opporunities for inconsistancy (such
as Ian observed, and as I repaired only a month ago.)
This promotes process_request_internal to an ap_ namespace protected
entity in server/request.c (from it's old home in http/http_request.c)
since this fn has no http specifics.
Normalize all paths to run the same, common code for pre-request setup
from the primary request, redirects and sub-requests.
This will significantly reduce opporunities for inconsistancy (such
as Ian observed, and as I repaired only a month ago.)
This promotes process_request_internal to an ap_ namespace protected
entity in server/request.c (from it's old home in http/http_request.c)
since this fn has no http specifics.
Jeff Trawick [Thu, 30 Aug 2001 20:27:05 +0000 (20:27 +0000)]
As suggested by Ryan and OtherBill, change the way that
mod_charset_lite checks to see if its filter will be
added by another module. Now, we run our insert-filter
hook really last and look at the actual filter chain.
(Note that http runs even later but it doesn't currently
do anything which would interfere.)
Same as Jeff Trawick's patch [thank you!] only a tad faster, and error
out on the old Set{Input|Output}Filter onefilter twofilter syntax
(prior to this patch, only the last filter in a space seperated list
would be configured.)
* configure.in: added Cygwin specific APR_SETVARs.
* os/config.m4: added Cygwin specific values for $OS and $OS_DIR.
$OS_DIR will change to "cygwin" as soon as I get the DSO/DLL things
clean as with 1.3.20.
* support/logresolve.c: added OS specific #ifdef statement to define
h_errno as extern __declspec(dllimport); it's imported from the
cygwin1.dll itself.
Doug MacEachern [Thu, 30 Aug 2001 05:25:31 +0000 (05:25 +0000)]
fix ap_remove_output_filter; the recent change to use remove_any_filter made
it possible to wipe out the entire filter chain. and then when
ap_finalize_request_protocol was called, r->output_filters was NULL,
preventing data from being flushed to the client.
PR:
Obtained from:
Submitted by:
Reviewed by:
Changed syntax of Set{Input|Output}Filter. The list of filters
must be semicolon delimited (if more than one filter is given.)
The Set{Input|Output}Filter directive now overrides a parent
container's directive (e.g. SetInputFilter in <Directory /web/foo>
will override any SetInputFilter directive in <Directory /web>.)
This new syntax is more consistent with Add{Input|Output}Filter
directives defined in mod_mime. Also cures a bug in prior releases
where the Set{Input|Output}Filter directive would corrupt the
global configuration if the multiple directives were nested.
[William Rowe]
Since the mod_mime patch was applied, here is the rest of the patch to
introduce the ForceType and SetHandler [absolute references] directly
into the very top of the fixups phase. This means these will always
override _any_ mime module, not just mod_mime. Ergo, other mime modules
can continue to set charset, encodings, etc. Since these are globals,
they belong in the core.
This highlights a very serious drawback to the type_checker hook. By
using run first, a module that identifies _partial_ information (maybe
just the content type) won't pass the query on to other modules, like
mod_mime, that might further define the encoding or charset. The
type_checker hook should clearly become a run-all, and the modules should
decline if they see someone ahead of them answered a question they were
going to try to figure.
Which means - if type_checker becomes RUN_ALL - this new override hook
fn should become a type_checker again - and RUN_REALLY_FIRST, and let
other modules _choose_ not to override this election. (We can run it
again at the end, for a recount ;) Votes?
Bill Stoddard [Thu, 30 Aug 2001 02:55:08 +0000 (02:55 +0000)]
Make CACHE_IN and CACHE_CONDITIONAL AP_FTYPE_CONTENT filters. Comtemplating
making a new filter type, AP_FTYPE_CACHE. We need to run CACHE_IN immediately
after the handlers are done and before we run the content through any filters.
Bill Stoddard [Thu, 30 Aug 2001 02:49:40 +0000 (02:49 +0000)]
Three small changes...
1. Change CACHE_TYPE_MALLOC to CACHE_TYPE_HEAP
2. Enable cacheing content contained in multiple brigades
3. Don't cache an entry more than once.