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.
Jeff Trawick [Wed, 29 Aug 2001 12:29:36 +0000 (12:29 +0000)]
From Mark Cox:
I've had a couple of emails from users using mod_usertrack for authentication.
Add the equivalent of a "warning: coffee may be hot" label, and fix a broken
email address at the same time.
Graham Leggett [Tue, 28 Aug 2001 23:16:12 +0000 (23:16 +0000)]
Add specified user attributes to the environment when using
mod_auth_ldap. This allows you to use mod_include to embed specified
user attributes in a page like so:
Hello <!--#echo var="AUTHENTICATE_CN"-->, how are you?
PR:
Obtained from:
Submitted by:
Reviewed by:
This is the same granularity of control as mod_mime gave to set handlers
(and now AddInputFilter and AddOutputFilter by extension) so this seems
entirely appropriate in the core as well. Options FileInfo is required
to change the processing behavior of files.
*) Modfied mod_mime to prevent mod_negotation from serving a multiview
of a 'handler' or 'filter', so that any filename extension that does
not contribute to the negotiated metadata can't be served without
an explicit request. E.g., if the .Z extension is associated with
an unzip filter, the user request somefile.Z.html, mod_negotiation
won't serve it. It can serve somefile.Z.html when somefile.Z is
requested, since the .Z extension is explictly requested, if the
.html extension is associated with ContentType text/html.
See changes for a complete description. Because (in the example) the
.Z extension doesn't affect negotiated behavior, the files index.html
and index.Z.html couldn't be distinguished, and the user would get an
error 406 NOT ACCEPTABLE, which is the _wrong_ answer.
Someone pointed out that we were running the images through the INCLUDE
filter. This fixes it, in a sort of hackish way.
I don't remember who noticed this, sorry :(
Version 1.338 of mod_mime also tightened the mod_negotiation behavior.
See changes for a complete description. Because (in the example) the
.Z extension doesn't affect negotiated behavior, the files index.html
and index.Z.html couldn't be distinguished, and the user would get an
error 406 NOT ACCEPTABLE, which is the _wrong_ answer.
Introduces mod_mime AddInputFilter and AddOutputFilter filter ext syntax.
Significantly refactored the code to maintain single functions for the
add_extension_info hash and remove_extension_info table processing.
The AddInputFilter/AddOutputFilter could have been plural, as they accept
a semicolon delimited list of filters (e.g. you need to stack two different
filters based on a single extension.) I expect that the plural could
confuse users, though, as they might expect AddInputFilters foo bar var
to add foo and bar to the extension var, which it definately doesn't do!
Ryan Bloom [Mon, 27 Aug 2001 23:50:12 +0000 (23:50 +0000)]
Remove an obsolete function from fdqueue. The worker MPM now uses the
fdqueue functions in a different way.
Submitted by: Aaron Bannert <aaron@clove.org>
As the worker MPM is really an alternative to the threaded MPM (and hopefully it'll be a replacement), the httpd.conf settings are identical.
Submitted by: Aaron Bannert <aaron@clove.org>
Reviewed by: Justin Erenkrantz
Fix a case where on restart, an admin started logging, and the logging
code waited to start until the second pass (assuming we were just starting
up) to open the log file. Also fix a typo.
Jeff Trawick [Mon, 27 Aug 2001 20:48:00 +0000 (20:48 +0000)]
Fix a growing connection pool in core_output_filter() for
keepalive requests. We were allocating a brigade out of the
connection pool; the number of these brigades allocated
per connection was theoretically unlimited.
Paul J. Reder [Mon, 27 Aug 2001 20:25:42 +0000 (20:25 +0000)]
Moved split_and_pass_pretag_buckets back to being a
macro at Ryans's request. Removed the return from it
by setting and returning a return code instead. Updated
the code to check the return code from teh macro and
do the right thing.
Ryan Bloom [Mon, 27 Aug 2001 17:21:29 +0000 (17:21 +0000)]
- allows empty $val from httpd-2.0/build/config_vars.mk
- make code more perlish.
- read and parse the config file only once
- use a hash instead of array for the list of internal config vars to
test against
- added -h option (just print usage)
- wrapped numerous print STDERR calls into a simpler error() and
notice() subs
- simplified some of the logic in if's using perl constructs.
Cliff Woolley [Mon, 27 Aug 2001 14:43:19 +0000 (14:43 +0000)]
The consensus now is that mod_include should just butt out of any decisions
about what to do with different request methods. It's true that mod_include
in 1.3.x did not allow POST, but back then it was a handler. Now it's a
filter and can be used to filter the output of dynamically generated responses,
even ones resulting from a POST request. So if mod_include is in the filter
stack, it should just blindly parse the brigade regardless of request method.
This still fixes the security problem, it just fixes it by being more flexible
rather than less so.
Ryan Bloom [Mon, 27 Aug 2001 06:00:51 +0000 (06:00 +0000)]
Allow mod_ssl to send back an error message if an HTTP request is sent
over an HTTPS connection. This also adds an ap_remove_input_filter
function, which should be used to remove the SSL input filter in this
case, as soon as this code is stressed a bit more.
For right now, we are sending the same message that we used to send in
mod_ssl for Apache 1.3.
Clean up location_walk, so that this step performs a minimum
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.
Doug MacEachern [Sun, 26 Aug 2001 18:57:16 +0000 (18:57 +0000)]
ap_content_length_filter has already set Content-Length
before ap_set_keepalive is called. need to remove this check
in order for keepalives to work.
PR:
Obtained from:
Submitted by:
Reviewed by:
Ryan Bloom [Sun, 26 Aug 2001 06:25:00 +0000 (06:25 +0000)]
Improvements to APXS. It now uses the config_vars.mk variables to
figure out how to build stuff. It uses the Apache build system for
the generated module, but not for command line builds. Maybe I'll fix
that one day. If somebody wants to beat me to it, that would be cool.
Doug MacEachern [Sun, 26 Aug 2001 06:01:59 +0000 (06:01 +0000)]
these modules were never built and had not been ported to 2.0
they have been ported and moved to httpd-test
PR:
Obtained from:
Submitted by:
Reviewed by:
Eliminate proxy: (and all other 'special') processing from the
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.
Readded "downgrade-1.0" which I (inadvertantly) pulled with the
map_to_storage patch. I knew it had to have a better home, and
it sure looks like this is it.
Split proxy: space using <Proxy[Match] > directive blocks from
the <Directory[Match] > and <Files[Match] > blocks. Mod_proxy
now bypasses the directory and files testing phase (and skips
the http TRACE default handler on it's own, as well). Note that
<Location > blocks continue to be processed for proxy: requests.
Remaining questions include canonicalization and case folding
of proxied uri space, prior to the proxy_walk testing and the
second <Location > walk.