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.
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.
Bill Stoddard [Wed, 2 Jan 2002 19:12:40 +0000 (19:12 +0000)]
Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems
to be a bit more descriptive. Move the check to inside the inner while()
loop and add an additional check for eos. If we get an EOS bucket, there
is no point in going further. Hopefully this will fix the last seg fault
in the function.
Fix LimitRequestBody directive by moving the relevant code from
ap_*_client_block to ap_http_filter (aka HTTP_IN). This is the
only appropriate place for limit checking to occur (otherwise,
chunked input is not correctly limited).
Also changed the type of limit_req_body to apr_off_t to match the
other types inside of HTTP_IN. Also made the strtol call for
limit_req_body a bit more robust.
Brian Pane [Tue, 1 Jan 2002 20:36:18 +0000 (20:36 +0000)]
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
Thanks Mr. Trawick, backtraces can be very enlightening.
This fixes two bugs, the segfault when researching index numbers,
and another. We don't hint anywhere that LanguagePriority is a
cumulative setting, in fact the syntax doesn't suggest so either.
Merges are always slow, there is no reason to make this even slower.
So the patch has the LanguagePriority directive override any existing
LanguagePriority list from an earlier container.
Bill Stoddard [Mon, 31 Dec 2001 20:53:28 +0000 (20:53 +0000)]
Prevent mod_proxy from truncating one character off the
end of the status line returned from the proxied server.
Note that buffer is NULL terminated by the call to
ap_proxy_string_read() so there is no need to terminate it
again.
Submitted by: Adam Sussman
Reviewed by: Bill Stoddard
Bill Stoddard [Mon, 31 Dec 2001 20:43:59 +0000 (20:43 +0000)]
Eliminate loop in ap_proxy_string_read(). Need to be able to handle
getting an empty brigade from ap_get_brigade(). Also made sure that
we always call ap_get_brigade() in readline mode.
Submitted/Reviewed by: Adam Sussman & Bill Stoddard
Saw this bug several hours ago, but it slipped my mind. We no longer
skip over the leading '/' character, since the token_re already strips
the / delimiters.
To provide more flexibility in handling quotes, allow the backtick quote
for SSI tag arguments (e.g. <!--#echo val=`foo` -->). This helps with
arguments containing both single and double quotes.
Ever tried to extract some value of QUERY_STRING from within SSI?
Now you can :) Provides $0..$9 results for any regex evaluation,
and strengthens the expr parser for regex expressions.
Joshua Slive [Sun, 30 Dec 2001 15:58:32 +0000 (15:58 +0000)]
Some new features updates.
Still lots missing from here, I'm sure. If you've added a new feature
since 1.3, please check to see if it is here. (And the same thing
for the "upgrading" doc.)
Gotta have an error doc to serve, even if it's not their favorite
language.
From the http://www.ethnologue.com/ survey of languages, their data
is, in descending order [in millions, by primary and pri+sec speakers]
EN 341 508
ES 322 417
DE 100 128
FR 77 128
Improvements suggested by Brian Pane, first assure all OS's get to deal
with handler 'server-parsed', do the xbithack bit tests before testing
it's string values (protected against a null point).
Once again, if mod_dir will perform an internal redirect into a
RESPONSE BODY (as opposed to 'something else' of it's own generation)
it needs to make the caller aware of the results (e.g. an included
subrequest) so the caller can decide if the result is suited (e.g.
including text/html only, but refusing to include other binary results.)
Since we can know everything about the results of the mod_dir processing
by the fixups phase, let it perform all resolutions before the caller
of ap_process_request_internal makes it's decisions.
Context mustn't be transformed in the insert_filters hook, it merely
provides a point to insert filters already determined. We can't wait
for the insert_filters phase to 'redetermine' such things.
Everything we are doing here can reliably occur in the fixup phase,
after the types phase has completed.
This otherwise ineffectual patch allows modules to perform internal
redirects of dirs into other resources, while still treating such a
resource as a dir, based on the original apr_dir_read results.
Aaron Bannert [Thu, 27 Dec 2001 21:36:10 +0000 (21:36 +0000)]
Two fixes in one:
- No longer calls exit() when the secret fails to initialize, instead
post_config just returns !OK and lets the server bail out.
- No longer fails on DSOs -- since we load-unload-reload DSOs we lose
any static memory that was initialized during the first load.
This patch allows us to simply pass on the first call to post_config,
and then do the initialization in the second call.
Greg Ames [Thu, 27 Dec 2001 19:53:37 +0000 (19:53 +0000)]
change ap_unix_create_privileged_process() to allocate enough space in
the newargs array to allow for a null terminator. This allows suexec and
mod_cgid to work together reliably.
Apparently, rounding up the size to a multiple of 8 bytes in apr_palloc
hid the problem sometimes. At other times, suexec would complain
about a null command name.
Aaron Bannert [Thu, 27 Dec 2001 19:40:15 +0000 (19:40 +0000)]
Style changes only. Lots of tab alignment issues, and added lots of
extra {} blocks. I first ran it through M-x untabify, then went through
the whole thing by hand, then compiled/tested it. This is a preemptive
style-strike.
Ian Holsman [Thu, 27 Dec 2001 06:03:13 +0000 (06:03 +0000)]
add a 'AuthDBMType' so that users can select what type of DBM they want to
use to authenticate users.
I think this removes a 'showstopper' (deprecating mod_auth_db)
Brian Pane [Wed, 26 Dec 2001 12:07:55 +0000 (12:07 +0000)]
Rearranged the code in mod_include's BNDM string-search function
for faster execution.
This new code short-circuits out of the inner scanning loop
after a single comparison when it hits a character not in the
"<!--#" pattern. Compared to the previous code, this version
does more work for characters in the pattern and less work for
characters not in the pattern. In practice, the net result
seems to be a speedup for typical shtml files, where characters
in the pattern are less common than characters not in the pattern.
David Reid [Tue, 25 Dec 2001 12:24:14 +0000 (12:24 +0000)]
Add ap_os_killpg as well as unixd_killpg and beosd_killpg.
Move the worker MPM to use ap_os_killpg in place of unixd_killpg as
this makes it more portable.
Ryan notes that really we should be using the POD mechanism to
control death of the child processes, so this is temporary until
we have that change in place. Note added to STATUS to that effect.
Jeff Trawick [Mon, 24 Dec 2001 13:18:44 +0000 (13:18 +0000)]
The scoreboard is no longer created while we can write to
stderr, so call ap_log_error() to note problems allocating
the scoreboard.
apr_shm_malloc() doesn't set any kind of error code, so don't
try to reference errno.
setup_shared() now returns an error code to its caller rather
than exiting directly. This isn't a complete fix, as
ap_create_scoreboard() needs to do the same thing. Currently,
when we can't allocate the scoreboard we leave the mod_cgid
daemon process stranded.