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.
Allow the core input filter to handle AP_NONBLOCK_READ request for a
finite number of bytes (i.e. *readbytes > 0).
ap_brigade_partition does a blocking read. So, what we should do is
apr_bucket_read on the socket for non-blocking. If we get less than
what they asked for, that's okay and we should just return that amount.
If they were non-blocking, we should always be non-blocking.
Ryan, Greg, and others can figure out if ap_brigade_partition should
be tweaked to handle AP_NONBLOCK_READ natively. I'm of a mixed mind,
but this addresses the short term need.
Make sure we run the new conf files through sed.
Now, the question is whether it might make more sense to have them
as ssl-std.conf, ldap-std.conf, and proxy-std.conf.
(I'm also not sure if this is even shell portable or not.)
I'll leave that up to OtherBill since he added these files.
Cleanup the config (somewhat) so that win32 -could- actually run from
the httpd-std.conf - but there are still some discrepancies to take
back to the conference committee :)
LDAP was voted some time ago into it's own httpd-ldap repository, and
never built on Win32; No ldap config directives are present, so I've
pulled it from both .conf files.
It would be really nice if the proxy team would come in and clean out
the deprecated/unsupported directives here.
Ryan Bloom [Thu, 4 Oct 2001 20:00:53 +0000 (20:00 +0000)]
Remove the Port directive. In it's place, the Listen directive
is now a required directive, which tells Apache what port to
listen on. The ServerName directive has also been extended
to accept an optional port. If the port is specified to the
ServerName, the server will report that port whenever it
reports the port that it is listening on. This change was
made to ease configuration errors that stem from having a Port
directive, and a Listen directive. In that situation, the server
would only listen to the port specified by the Listen command,
which caused a lot of confusion to users.
Ryan Bloom [Wed, 3 Oct 2001 17:47:51 +0000 (17:47 +0000)]
Fix --enable-mods-shared processing. If most is specified,
then all modules that can be compiled as shared modules are. This
was done by adding a module config specifier, static, which denotes
that a module can not be compiled as a DSO.
Ryan Bloom [Wed, 3 Oct 2001 17:44:34 +0000 (17:44 +0000)]
Add a Listen directive to the default config file. This allows us to
later add another listen directive, in the default SSL config file,
without stopping the server from listening on port 80. The next step
is to combine the Port and ServerName directives, so that Port can go
away finally.
Ryan Bloom [Wed, 3 Oct 2001 17:31:13 +0000 (17:31 +0000)]
Remove an old comment. This config.m4 is numbered 9, which is the
highest possible number, so it is garaunteed to be in the last batch. Any
module config.m4 should just use a number < 9 to ensure that this continues
to work.
One more note on the last commit - the 'cannot serve an absolute path'
bug was identified by, and debugged with hints and examples provided by
Ryan Morgan <rmorgan@covalent.net> --- his example module demonstrating
the problem was invaluable :)
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.
Fix a mismatching issue, where index.html.foo.en had recognized .html and
.en components, and exceptions index and foo. This patch will ignore the
'missing' exception html from the request, and go on to test the exception
foo in the list.
This does -not- imply that a request for index.foo will succeed, in the
example above. The pattern match tests index.foo[.*] so we wouldn't find
index.html.foo.anything. The pattern matching proposed at one time by
Francis Daly would allow index.foo to succeed as well [although many to
many matching is dangerous, see comments in this patch.]
Lars Eilebrecht [Tue, 2 Oct 2001 21:54:28 +0000 (21:54 +0000)]
Update mime.types file.
Map video/vnd.mpegurl to mxu according to
ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/video/vnd.mpegurl
and audio/x-mpegurl to m3u, because it is commonly used.
Submitted by: Heiko Recktenwald <uzs106@uni-bonn.de>
Reviewed by: Sander van Zoest, Lars Eilebrecht
Ian Holsman [Tue, 2 Oct 2001 04:09:53 +0000 (04:09 +0000)]
Added Doxygen Comments
With these 2 changes most of the Doxygen warnings go away.
(these patch just modifies comments/slight moves in typedefs, no other changes)
Ryan Bloom [Mon, 1 Oct 2001 19:37:20 +0000 (19:37 +0000)]
clean up the fdqueue a bit more, by implementing Greg's
suggestions to getting rid of redundant variables, as well as
converting the simple ap_queue_full/ap_queue_empty tests into macros.
This also reinstates the "not_full" condition, which turned out to
be useful afterall in cases where we wanted to prevent the listener
thread from accepting further connections until the worker queue has
room for more.
Cliff Woolley [Mon, 1 Oct 2001 19:19:45 +0000 (19:19 +0000)]
Switch from tmpnam() to apr_file_mktemp() so that gcc with a recent glibc
will shut the hell up about tmpnam() being unsafe. htpasswd.c needs a
similar treatment, but it won't be _quite_ as easy since htpasswd has not
been completely apr-ized yet.
- substr used in APACHE_MODULE for the help string did not parse correctly
with autoconf 2.50+ so we had to punt there anyway and use AC_HELP_STRING.
- Add APACHE_HELP_STRING define that will call AC_HELP_STRING on 2.50+
(actually not 2.13 - look at the regex call) or do our custom variation
of it. This function can't have any extra spaces or it will be returned
in the help string. So noted. If anyone can figure out how to insert
a line break like 2.50+ does when we go over the 26th column, I'd
appreciate it. I tried and I'm way too tired to figure it out now.
Adding this would greatly simplify two or three HELP_STRING uses.
- Switch all of those annoying WITH and ENABLE functions to use the
APACHE_HELP_STRING. This makes everything consistent now. I've always
had to go through and keep aligning everything every few months or so
because I'm the only one who cares. No more. I refuse to do it any more!
Use APACHE_HELP_STRING or be crucified.
Looks decent with autoconf-2.13 and autoconf-2.52.
Graham Leggett [Sat, 29 Sep 2001 19:51:55 +0000 (19:51 +0000)]
Fixing the mod_proxy docs. The docs were transferred away without a history,
so I'm applying each of the new patches one by one (there are only a few of
them) so that the new mod_proxy.html file is up to date.
This first patch returns the original doc to the tree. Subsequent patches
will apply the changes to the file up to date.
PR:
Obtained from:
Submitted by:
Reviewed by:
Remove the lameo create_req hack and delay the addition of the HTTP_IN
filter until after we have read the headers. This eliminates the status
hack that was in http_protocol.c and makes it all around better.
server/protocol.c now directly adds HTTP_IN filter - should we create a
specific hook for this? (Could we do this as a post_read_request hook?)
I'm not terribly sure, but let's move it down to the lowest possible
place in ap_read_request. We can change this detail later as we see fit.
Implement suggested input filter improvements from Greg and Ryan.
- Clean up scopes and namings of certain variables
- Add comments about potentially bogus modes
- Consolidate a FOREACH loop into a single brigade_length call
Input filtering rewrite. Consolidate how we handle HTTP input parsing by
rearranging and rethinking some things. The net result is that the HTTP
filter is now a request filter and is now only responsible for HTTP things.
The core input filter is now responsible for handling all of the dirty work.
Highlights:
- Removes the dechunk filter and merges it with ap_http_filter (aka HTTP_IN).
The dechunk filter was incorrectly handling certain cases (trailers).
- Moves ap_http_filter from a connection filter to a request filter
to support the consolidation above (it needs header info).
- Change support code to allow the http_filter to be a
request filter (how the request is setup initially).
- Move most of the logic from HTTP_IN to CORE_IN (core_input_filter).
HTTP_IN is now only concerned about HTTP things. The core filter
is now responsible for returning data. It is impossible to
consolidate dechunk and http without this because HTTP_IN previously
buffered data. As Greg has suggested, it may make sense to write
some brigade functions that handle input (getline). It should be
fairly trivial to add these. Some of the calls in ap_http_filter
could be switched as well.
This is the original patch as submitted to dev@httpd on Monday, Sep.
24th. Additional comments and some minor tweaks done after that
submission are coming up next. This should allow people who reviewed
the original patch to see what has changed and review them piecemeal.
This test passes all current tests in httpd-test. Please perform
chicken sacrifices to verify that this hasn't blown up your favorite
input.
Reviewed by: Greg Stein, Ryan Bloom, and Cliff Woolley (buckets)
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...
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.
MAJOR charset encoding fixes. The file names and HTTP-Equiv tags are now
in sync with the httpd-std.conf - and the ucs2/4 encodings are gone since
utf8 is a universally recognized shorthand that sits much better in our
tree [notice; these were _duplicate_ character sets, only in different
byte encodings!] Same with removing the duplicate .jis and .is-kr files.
[I simply choose the one 'with link' over the one without, and fixed the
links back to preFAQ as I picked.]
Russian users, how many of the remaining five encodings are truly needed?
Overhaul the compatibility with 1.3's subrequest and redirect processing.
Eliminate URI-centric phases in ap_process_request_internal() for pure
file subrequests (that don't correspond to URI space.) translate_name
hook and location_walks are skipped for these requests.
Moves the reset of the per_dir_config out of directory_walk into the
internal request processing code, so that resources with alternate
map_to_storage requirements start with clean r->server->lookup_defaults.
Optimizes out the authn/authz of effectively identical subreqests and
redirects, as the sub_req_lookup calls once did. Unlike 1.3, we copy
r->user and r->ap_auth_type from main/prev for the request's reference.
Stop copying the subrequest's r->chunked flag (Rbb assured me it looked
bogus, chunking is on the parent request) and clean out other #if 0'ed
cruft we don't need to refer back to anymore.
Immortal data should go in an immortal bucket, not a pool bucket. It would
still work in a pool bucket, but only by coincidence. At the very least, a
pool bucket is way more overhead than this poor unsuspecting little CRLF
needs to get by.
Mark J. Cox [Wed, 26 Sep 2001 08:25:14 +0000 (08:25 +0000)]
Update the mime.types file to the registered media types as
of 2001-09-25, and add mapping for xsl extension
PR:
Obtained from:
Submitted by:
Reviewed by:
Ryan Bloom [Tue, 25 Sep 2001 15:58:52 +0000 (15:58 +0000)]
httpd.exp is a generated file, and therefore, it is generated into the
build directory, not the source directory. When we go to use it, we
have to look in the build dir for it.
Ryan Bloom [Mon, 24 Sep 2001 23:03:42 +0000 (23:03 +0000)]
Clean the worker MPM a bit. This removes the idea of compiling worker
with no threads. That doesn't make any sense anyway. Also, raise
HARD_SERVER_LIMIT to 16, from 8.