Ryan Bloom [Thu, 27 Jun 2002 06:07:58 +0000 (06:07 +0000)]
Fix a long-standing bug in 2.0, CGI scripts were being called
with relative paths instead of absolute paths. Apache 1.3 used
absolute paths for everything except for SuExec, this brings back
that standard.
- Fix segfault in core_output_filter when we are passed an empty brigade.
- Stash the remainder of the brigade in more when we see a flush bucket.
Previous to this commit, we would only process the buckets before the
flush on a HTTP/1.0 request and then return.
We are proably only finding this now since we now correctly check for
keepalive connection status.
Bradley Nicholes [Wed, 26 Jun 2002 21:53:25 +0000 (21:53 +0000)]
Re-architected the select()/accept() loop to allow all threads to rely on select() to
signal when data is ready rather than only allowing a single thread at a time to
be signaled by select(). This allows Apache to pull the requests off of the
listen queue as fast as winsock will allow without latency introduced by the
accept mutex.
Change conn_rec->keepalive to an enumerated value of
AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE
This also fixes a problem where ap_discard_request_body would not discard
the body when keepalive was 0. This actually meant the keepalive status
was unknown *not* closed, but no one ever remembered that.
This problem was seen with mod_dav sending error responses (as reported by
Karl Fogel).
Rich Bowen [Wed, 26 Jun 2002 02:33:12 +0000 (02:33 +0000)]
Small change of phrasing on the vhosts index page. A reordering of the
main links in order to put the less commonly used stuff to the bottom of
the list.
Rich Bowen [Wed, 26 Jun 2002 02:31:47 +0000 (02:31 +0000)]
Obtained from: IRC, various other conversations
A number of people commented that they thought that beginners would find
that the IP addresses used in examples did not appear "real" enough.
Also, that the ".tld" domain names used in examples were confusing.
Examples have been changed to use 172.20 IP addresses, and host names
using more recognized tlds.
Greg Ames [Mon, 24 Jun 2002 17:06:19 +0000 (17:06 +0000)]
ap_discard_request_body: exit without reading the body if
connection->keepalive is false. This works in conjunction with
ap_die which resets connection->keepalive any time
ap_status_drops_connection is true. The latter is explicity tested
here in case ap_die isn't involved.
Introduce win32 registry handling through a very apr-ish interface.
Deals with apr utf-8 encoding of filesystem values, so we preserve
strings in any locality or nationalized flavor of WinNT, and avoid
the gunk for Win9x.
Brian Pane [Sun, 23 Jun 2002 09:01:22 +0000 (09:01 +0000)]
Removed "tolower(++s)" idiom from ap_strcasestr(), to avoid side-effects
on any platform with a macro-based tolower() that references its argument
multiple times.
Brian Pane [Sun, 23 Jun 2002 08:10:49 +0000 (08:10 +0000)]
Convert the hostname to all-lowercase in fix_hostname() so that
the implementation matches the comments. (Note: The current virtual
hosting code does case-insensitive host matching, so this fix is useful
mostly to help ensure that custom modules and any future vhosting code
don't get tripped up by case-sensitivity issues.)
Submitted by: Perry Harrington <pedward@webcom.com>
Reviewed by: Brian Pane
Fixes Win32 cgi 500 errors when QUERY_ARGS or other strings include
extended characters (non US-ASCII) in non-utf8 format. This brings
Win32 back into CGI/1.1 compliance, and leaves charset decoding up
to the cgi application itself.
Accomplished this by utf-8 encoding of plain octets for user and header
data, so that the apr_proc_create() translates back to single unicode
characters. This won't necessarily translate into the correct octet
depending on the codepage used by the cgi app. That's the next task.
Simplify add_ssi_vars() and move the ssi/cgi vars into their respective
functions [so we may address r->subprocess_env in the ap_cgi_build_command
win32 handler.]
Rich Bowen [Sat, 22 Jun 2002 19:54:41 +0000 (19:54 +0000)]
Every directive in the 2.0 documentation tree now has an example, except
those directives which have a fixed set of options (such as On or Off).
It might be nice to back-port some of this to the 1.3 docs, but I'm not
particularly motivated to do that myself.
Rich Bowen [Sat, 22 Jun 2002 19:49:34 +0000 (19:49 +0000)]
Largely rewritten, based on feedback on the list, on IRC, and questions
on usenet. Hopefully this is a little more what people are actually
looking for, and will steer people towards better practices. Quite a lot
of work still needs to be done, but this is the first cut, and, I think,
somewhat of an improvement. Comments solicited.
Bill Stoddard [Sat, 22 Jun 2002 19:22:40 +0000 (19:22 +0000)]
Move the req_hdrs pointer from the cache_object_t to the cache_handle_t. Each
thread serving a request needs to update the req_hdrs pointer so it needs to
reside in r->pool (where the cache_handle_t resides).
Note the changed meaning of the NULL next_filter argument to the
ap_sub_req_lookup() family, and fix a few oddball cases (those are,
PATH_TRANSLATED reference issues.)
Ryan Bloom [Fri, 21 Jun 2002 18:49:11 +0000 (18:49 +0000)]
Add a timeout option to wintty. This allows the user to specify a number
of seconds to wait after the program terminates before closing the window.
Previously, the windows would remain open indefinately. This option is
not currently being used by Apache.
Greg Ames [Fri, 21 Jun 2002 13:58:39 +0000 (13:58 +0000)]
ap_die: get rid of bad side effects from the recursive error handling code
that mess with the status and which request_rec the rest of the function uses.
Joshua Slive [Thu, 20 Jun 2002 03:51:46 +0000 (03:51 +0000)]
Back-out recent changes to the internationalized error docs to remove the
server string. Now that these error docs are no longer the default
for install-and-forget-it users, having them display this useful information
should no longer be a danger.
Joshua Slive [Thu, 20 Jun 2002 03:50:04 +0000 (03:50 +0000)]
I've been threatening to do this for a few days, but I wanted to wait for other dust
to clear.
Comment-out the internationalized error responses in the default configs.
I think these error docs are great, and anyone who understands the server
should be using them, but because of their complexity, they are a danger
to people who blindly install apache and forget it.
Developers especially should continue to use them, because they are great at
finding obscure bugs in mod_include, mod_negotiation, and sub-request
processing.
Brian Pane [Wed, 19 Jun 2002 07:21:45 +0000 (07:21 +0000)]
Fixed the EOS handling for partial SSI directives at the end of
brigades. (This was causing us to produce no output, not even
an HTTP response header, for a document containing an unterminated
"<!--#" directive
Aaron Bannert [Wed, 19 Jun 2002 01:37:29 +0000 (01:37 +0000)]
Darwin5.5, Solaris8/intel, and Linux2.4 (Redhat7.2) are on daedalus.
I also removed Darwin 5.3 since it's unlikely someone will want binaries
for this kernel.
Cliff Woolley [Tue, 18 Jun 2002 02:58:36 +0000 (02:58 +0000)]
* clear up a warning that NOFILE was redefined on HP/UX.
* fix a logic bug ... a binary and that should have been a binary or.
(that one was just reporting a commandline args error, noncritical)
Roy T. Fielding [Tue, 18 Jun 2002 00:14:21 +0000 (00:14 +0000)]
It isn't valid to check errno without setting it first, unless an
error return value already indicated that errno was set. Also, we might
as well accept any error or junk remaining in the field as a parse error.
These emits occur mainline, outside of the pphrase_callback, so we never
opened readtty or writetty. But they are absolute failures, nothing the
user could do to deal with them. They are logged in the ssl vhost's error
log.
In this case, I forgot my SSLCertificateKeyFile, so the server never
tried the callback. writetty wasn't initialized, so we segfaulted.
This segfault is due to misconfig, not to the dialog with the user.
This is the easiest fix (easier to read, too), but we shouldn't need
to worry too much that the release is tagged. If we retag, fine, then
grab it, but it only addresses a config problem.
Rewrite ap_get_client_block to rely on assumptions that have been
solidified after this code was originally written. Namely:
- AP_MODE_READBYTES will only return a brigade representing AT MOST bytes
of data. It can NOT return MORE than requested.
- APR_BLOCK_READ is respected - it is considered a design error of a filter
if it returns without reading something.
- apr_brigade_flatten is available to do the heavy lifting of the copying
into a flat buffer (as hinted at by the removed comment).
Brian Pane [Sun, 16 Jun 2002 22:55:11 +0000 (22:55 +0000)]
More changes to bring the performance tuning guide closer to compatibility
with httpd-2.0:
- Updated the sample system call trace with a 2.0/worker example
- Removed the section on the preforking model