Jeff Trawick [Mon, 18 Dec 2000 17:52:05 +0000 (17:52 +0000)]
API routines ap_pgethostbyname() and ap_pduphostent() are no longer
available. Use apr_getaddrinfo() instead.
The ap_pduphostent() code was moved to modules/proxy/proxy_util.c for
now since that is the only caller. When the proxy's use of the
resolver is APR-ized this won't be needed anymore.
Ryan Bloom [Sun, 17 Dec 2000 23:05:24 +0000 (23:05 +0000)]
Clean up some formatting. Using a tab of 22 characters makes the output
very annoying to read. 8 looks much more reasonable to me.
PR:
Obtained from:
Submitted by:
Reviewed by:
Ryan Bloom [Sun, 17 Dec 2000 18:04:14 +0000 (18:04 +0000)]
Get byterange requests working with data that is generated by a handler
that does not add a content-length. For example, mod_autoindex doesn't
set a content-length, but the byterange filter requires one. We fix this
by computing the content-length in the byterange filter.
Jeff Trawick [Sun, 17 Dec 2000 17:47:03 +0000 (17:47 +0000)]
When the platform supports IPv6 (according to APR) and
the system is configured to support IPv6, Apache gets IPv6
listening sockets unless the Listen statement says otherwise
(i.e., Listen specifies an IPv4 numeric address string or a
hostname which resolves to an IPv4 address).
Jeff Trawick [Sun, 17 Dec 2000 12:30:29 +0000 (12:30 +0000)]
Call ap_log_error() instead of ap_log_rerror() from alloc_listener().
This bug, introduced in a recent commit, caused a segfault when the
hostname couldn't be resolved.
Jeff Trawick [Sat, 16 Dec 2000 21:36:33 +0000 (21:36 +0000)]
get_addresses()
. use apr_parse_addr_port() so we handle IPv6 addresses on
NameVirtualHost and <VirtualHost > directives
. don't hardcode AF_INET when a hostname or IP address was
coded
dump_a_vhost()
. check the address family before looking for certain IPv4
addresses
ap_fini_vhost_config()
. pass apr_status_t to ap_log_error() after apr_getnameinfo()
fails
Jeff Trawick [Sat, 16 Dec 2000 14:49:18 +0000 (14:49 +0000)]
tweak the responsibilities of make_sock() and alloc_listener()
because we need to resolve the hostname (i.e., call apr_getaddrinfo())
before creating the socket so that we get a socket of the appropriate
family
also, simplify some of the address displays in some error logs
Jeff Trawick [Sat, 16 Dec 2000 12:54:53 +0000 (12:54 +0000)]
Use apr_parse_addr_port() in fix_hostname(). This simplifies the
code by a small (okay, tiny) amount and lets IPv6 numeric address
strings be passed through.
Obtained from: the idea is from the KAME IPv6 patch for Apache 1.3
Jeff Trawick [Sat, 16 Dec 2000 12:21:21 +0000 (12:21 +0000)]
use apr_parse_addr_port() in ap_set_listener(); this allows IPv6
numeric address strings to be specified (though we wouldn't get
an IPv6 socket for it at the moment)
consolidate the use of APR_ANYADDR and make a note about its
protocol dependence
Jeff Trawick [Fri, 15 Dec 2000 19:20:12 +0000 (19:20 +0000)]
move closer to IPv6 support by changing the server_addr_rec
representation of the bound address to something which handles
IPv6; this also allows us to switch to APR resolver routines
in places instead of calling gethostbyname() and gethostbyaddr()
directly
Issues remaining with this set of changes:
1) apr_snprintf()'s %pA formatting needs to change to take
apr_sockaddr_t * instead of sockaddr_in * -OR- just get rid
of that type of formatting
2) apr_get_inaddr() is no longer used and should be removed
Jeff Trawick [Fri, 15 Dec 2000 13:28:57 +0000 (13:28 +0000)]
Axe ap_get_virthost_addr(). This <address>[:port] parse routine
is not used anymore and it doesn't handle IPv6, so it is best to
drop it. If/when mod_tls (Netware) is ported to 2.0 it can use
apr_parse_addr_port().
Jeff Trawick [Wed, 13 Dec 2000 13:03:32 +0000 (13:03 +0000)]
Get mod_rewrite to work as a DSO by changing the way it
keeps track of whether or not its post config hook has
been called before. Instead of a static variable (which
is replaced when the DSO is loaded a second time), use
userdata in the process pool.
Jeff Trawick [Wed, 13 Dec 2000 04:03:19 +0000 (04:03 +0000)]
Get mod_cgid to work as a DSO by changing the way it
keeps track of whether or not its post config hook has
been called before. Instead of a static variable (which
is replaced when the DSO is loaded a second time), use
userdata in the process pool.
Add magic, mime.types and -default of all /conf files to the Win32
build/install. Also copy the manual tree to htdocs/manual/, and the
index pages (if they do not exist) to htdocs/
One, it's very hard to type perl without $'s (stolen by the .mak parser)
Two, it's official ... we don't have anything useful on Win32 to help us
with rewriting (no sed, no nothing, by default) so we will require perl.
Sorry to anyone that causes trouble for, but it's fairly unavoidable
unless we want sed instead.
Jeff Trawick [Tue, 12 Dec 2000 15:00:33 +0000 (15:00 +0000)]
Add "(const void *)" back to the hack variable assignments to avoid
warnings like this on Tru64 (and perhaps other platforms):
cc: Warning: exports.c, line 349: In the initializer for
ap_hack_apr_dbm_nextkey, the referenced type of the pointer value
"apr_dbm_nextkey" is "function (pointer to struct apr_dbm_t, pointer
to struct declared without a tag) returning int", which is not
compatible with "const void". (ptrmismatch)
const void *ap_hack_apr_dbm_nextkey = apr_dbm_nextkey;
--------------------------------------^
Jeff Trawick [Tue, 12 Dec 2000 12:51:19 +0000 (12:51 +0000)]
Get "make install" to install DSOs again.
static has just the list of static modules for this directory, so
in all but one of our module directories mod_so won't be in this
list, preventing us from thinking this is a DSO build.
BUILTIN_LIBS is always a valid check since it is the entire list
of modules.
Here's what should work flawlessly... WinNT/2K as a service or a
console app, Win9x as a console app or hidden service, the ctrl+c,
ctrl+break and close button on all platforms. Now the rough part,
Win9x, while the processes set themselves up as services, are dieing
on logoff. My guess, the hooks are deregistered regardless on logoff,
unloading the 'partner' .dll that is sitting in WinOldAp's process.
Anyway, before rebooting 1,000 more times, and possibly loosing some
fruits of my effort, here is the working code.
Ryan Bloom [Mon, 11 Dec 2000 23:42:01 +0000 (23:42 +0000)]
Get perchild serving pages again. This doesn't work completely, namely it
can't really pass the data correctly yet, but at least it serves pages
correctly when the correct child accepts the page.
So close we can taste it, this patch adds necessary delay timers for
the win32 console window detection, gobs of documentation and some
streamlined and more debuggable structure, pardon the reorg of the
source for Win9xConHook.
The feature macro may appear a bit odd. I'm open to any better suggest.
Define AP_AUTH_DBM_USE_APR for apr dbm access, and apply the symbol to
the win32 build.
Greg Stein [Fri, 8 Dec 2000 12:40:20 +0000 (12:40 +0000)]
configure's --with-* type switches are the standard way to specify foreign
directories to a package. APRUTIL works this way, and does not need APR's
location at buildconf.sh time.
Greg Stein [Fri, 8 Dec 2000 09:33:31 +0000 (09:33 +0000)]
not into looking into this right now, but it should be done. just watch the
make output and the bazillion -export-dynamic options getting added to know
that something should be fixed :-)
[ and more precisely, it is needed for AP modules, but not Apache itself nor
libraries such as libmain.la; therefore, the move to special.mk ]
Ryan Bloom [Fri, 8 Dec 2000 01:26:31 +0000 (01:26 +0000)]
Get Apache filters and Apr-util buckets using the same values for
blocking and non-blocking reads. This allows us to use the mode parameter
passed to a filter to read from the bucket correctly.
Eliminate the /GX flag from release builds of the support tree. This
disables exception handling overhead that has no handler in Apache.
Add the /Fd"Debug|Release/projname" options to eliminate conflicting
vc50.pdb and vc50.idb files.
Greg Stein [Thu, 7 Dec 2000 11:52:17 +0000 (11:52 +0000)]
*) top-level: build our base libraries (srclib) first since these (by
definition) have no dependencies on anything else. this will also ensure
that we have *.exports available for building server/
*) add the "test" SUBDIR back in so that it gets called for "make clean" and
other types of make targets.
*) revise test/Makefile.in so that it does not build any test programs by
default. add "make test" to build any/all test programs.
Greg Stein [Thu, 7 Dec 2000 11:37:08 +0000 (11:37 +0000)]
*) fix up buildexports.sh:
- enable it to be run from any dir by passing a parameter for the
location of srclib, and using its own location for determining where
the AWK script is located
- accept exports files on STDIN, and produce output on STDOUT
- use "pwd" and cd back to it, rather than assuming ../../.. (which might
not apply if we feed it other export files)
- add USAGE reporting
*) generate exports.c during normal build of "server" rather than during the
buildconf stage. update invocation to match above changes
*) revamp the ap_ugly_hack referencing in main.c: put it at the bottom of
the file with the other, similar references, and style it similarly.
*) remove the ap_ugly_hack declaration from http_main.h; it is internal to
the "server" code
Greg Stein [Thu, 7 Dec 2000 10:31:16 +0000 (10:31 +0000)]
*) add check for mod_so
*) juse use APACHE_MODULE (the custom defun only saved a single arg)
*) toss AC_SUBST(STANDARD_LIBS) line; it isn't used/needed
Ryan Bloom [Thu, 7 Dec 2000 03:32:54 +0000 (03:32 +0000)]
Make mod_include use a hash table to associate directive tags with
functions. This allows modules to implement their own SSI tags easily.
The idea is simple enough, a module can insert it's own tag and function
combination into a hash table provided by mod_include. While mod_include
parses an SSI file, when it encounters a tag in the file, it does a
hash lookup to find the function that implements that tag, and passes
all of the relevant data to the function. That function is then
responsible for processing the tag and handing the remaining data back
to mod_include for further processing.
Submitted by: Paul J. Reder <rederpj@raleigh.ibm.com>
Reviewed by: Ryan Bloom