Ryan Bloom [Mon, 8 Jul 2002 03:40:37 +0000 (03:40 +0000)]
VC6 is unable to deal with dependencies that are still due to be made.
This moves around the order of compilation around so that the error goes
away.
PR: 10130
Submitted by: James Cox [imajes@php.net]
Bill Stoddard [Sun, 7 Jul 2002 16:35:20 +0000 (16:35 +0000)]
Optimize reading keep-alive requests with APR_INCOMPLETE_READ. In the
profiling I've done, the read() in apr_read() would always fail with
EAGAIN. This will send the thread directly to select to wait for the
next request.
Ian Holsman [Sat, 6 Jul 2002 20:04:38 +0000 (20:04 +0000)]
Renames Pending:
This clears the list of renames pending in apr-util.
Parts of this list was alreadu done, but the pending list hadn't been updated.
apr_hook_debug_current from apr_current_hooking_module
apr_hook_debug_show from apr_show_hook
apr_hook_global_pool from apr_global_hook_pool
apr_hook_sort_all from apr_sort_hooks
apr_uri_port_of_scheme from apr_uri_default_port_for_scheme
apr_uri_unparse from apr_uri_unparse_components
apr_uri_parse from apr_uri_parse_components
apr_uri_parse_hostinfo from apr_uri_parse_hostinfo_components
apr_uri_t from apr_uri_components
All APR_URI_* from all APU_URI_* symbols
All APR_UNP_* from all UNP_* symbols
PR:
Obtained from:
Submitted by: Thom May
Reviewed by:
Brian Pane [Sat, 6 Jul 2002 01:53:37 +0000 (01:53 +0000)]
Eliminated the use of AP_MODE_SPECULATIVE brigade reads to check
for request header continuation lines. Instead, ap_get_mime_headers_core()
now sets aside each line of input until it sees the next line. If the
next line starts with a tab, it is appended to the previous one; otherwise,
the previous line is added to the request headers table.
This reduces the number of temporary buckets that must be created
and destroyed to read in a request.
Brian Pane [Thu, 4 Jul 2002 17:05:25 +0000 (17:05 +0000)]
Re-use the same temp brigade to read all lines of a request header,
to avoid the overhead of brigade creation and deletion. (This produced
a 5% reduction in the total CPU usage of a minimalist httpd configuration:
<JHEPKCEMGPKFFDHHDDKDMELFEKAA.bill@wstoddard.com>)
Add a new directive: MaxMemFree. MaxMemFree makes it possible
to configure the maximum amount of memory the allocators will
hold on to for reuse. Anything over the MaxMemFree threshold
will be free()d. This directive is usefull when uncommon large
peaks occur in memory usage. It should _not_ be used to mask
defective modules' memory use.
Fix C-L filter non-blocking-mode brokenness. It was failing to ever
read from pipe/socket buckets again if it got APR_EAGAIN from them
due to its use of APR_BRIGADE_FOREACH.
A bit more ap_regkey and apr-ization. Fixes some new bugs where the
AP_REGKEY_CREATE flag wasn't passed for ap_regkey_open (when the key
is expected to not yet exist), and adds the new flags arg to value_set.
Replace CreateProcess with properly formed apr threadproc code.
Although it's nearly a noop (except that we handle i18n paths that
translate into Unicode), I'm committing both so that they can be
compared. Use this version to eyeball bit for bit what has changed.
Brian Pane [Mon, 1 Jul 2002 05:05:51 +0000 (05:05 +0000)]
Optimization for ap_rgetline_core(): When "folding" mode is enabled,
clear and re-use the temporary brigade rather than destroying it
and creating a new one
Ryan Bloom [Sat, 29 Jun 2002 16:24:35 +0000 (16:24 +0000)]
Preserve existing installation directories. We copy over binaries,
the build directory, the headers, and the man pages. Everything else,
the config, htdocs, manual, error, icons, and cgi directories are
not installed if the directories already exist. I got sick of having
to re-edit printenv for my tests, and this is the same logic 1.3 used.
Add a filter_init function to the filters so that a filter can execute
arbitrary code before the handlers are invoked.
This resolves an issue with incorrect 304s on If-Modified-Since mod_include
requests since ap_meets_conditions() is not aware that this is a dynamic
request and it is not possible to satisfy 304 for these requests (unless
xbithack full is on, of course). When mod_include runs as a filter, it is
too late to set any flag since the handler is responsible for calling
ap_meets_conditions(), which it should do before generating any data.
If a module doesn't need to run such arbitrary code, it can just pass NULL
as the argument and all is well.
Jeff Trawick [Thu, 27 Jun 2002 10:47:49 +0000 (10:47 +0000)]
fix compile breakage with IBM's xlc compiler caused by the
attempt to lose const on progname
strrchr was not the real library function that takes a
const parameter; instead, strrchr was the Apache macro which
makes it clear that const will be lost
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).
Richard 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.
Richard 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.