Cleaning up. Note that apache (or https) -D DEFINE is now enabled, the
shared data is now properly moved to either ap_hooks.c or http_config.c,
and all should be well with rewrite_args.
Next stop, no more apache_main entry point. That's why this file needs
to be empty of any callbacks or shared data, as it will bind to the core
but the core won't be looking back into http_main.
Pass the process_rec to the MPM to allow rewriting of the args list.
Especially necessary under Win32, or other non-unix front ends where
oddball arguments might be required, but without causing a mess in
http_main.c.
This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations. As with
the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.
I will be happy to revert the inclusion of ap_config.h from
httpd.h if this bothers anyone. More individual modules need
to be patched if we do so.
The API_EXPORTs all moved into central storage in the ap_config.h
header. Without WIN32 or API_STATIC compile time declarations,
these macros remain no-ops.
This patch also moves the following data from http_main to http_config:
And the following variables had already moved into ap_hooks.c:
ap_pool_t *g_pHookPool; (initialized now in http_config)
int g_bDebugHooks; (out of http_config)
const char *g_szCurrentHookName; (out of http_config)
The changes to http_main.c are in preparation for that module to
move out to a seperate .exe for win32. Other platforms will be
unaffected, outside of these changes.
Greg Stein [Sat, 27 May 2000 00:48:49 +0000 (00:48 +0000)]
fixes some compilation errors (macros, function params, etc). also shifts
the time when ap_destroy_pool() is called. it used to be called too
soon, which caused a core dump on the second CGI request.
Submitted by: Paul J. Reder <rederpj@raleigh.ibm.com>
Reviewed by: Greg Stein
All waiting to bite us... just go ahead and ignore this commit. Better
now that when we are deciphering real changes. This knocks all the
projects into what I expect is a clean VC6 format.
Whoops... the two converters were to be non-destructive, and should be
allowed to run multiple times in a row without harm. This fixes a
snafu that created multiple #PROP lines when invoked repeatedly.
Take advantage of Bill Stoddard's goof to change this over permanently.
Conversion is rather one way, for consistency. We can't really maintain
a dsp version 5 file from version 6, since version 5 likes to split up
!MESSAGE lines in odd places. This should make things more consistent.
Please execute cvstodsp5.pl from the helpers folder, prior to actually
using the MSVC 5.0 environment. When you are ready to diff, update or
commit changes, use dsp5tocvs.pl from the helpers folder to convert
them all back. (Be careful that you have CLOSED the DevStudio workspace
before you try either command!)
Ryan Bloom [Thu, 25 May 2000 23:29:59 +0000 (23:29 +0000)]
This item doesn't really work properly, so we are removing it from the
STATUS file. I was going to wait, but Manoj (the person who originally
put it in STATUS) said get rid of it, so away it goes.
Jeff Trawick [Thu, 25 May 2000 20:51:25 +0000 (20:51 +0000)]
APACHE_XLATE, CHARSET_EBCDIC stuff:
Provide new function ap_set_content_xlate() to simplify what needs
to be done to set up translation of content. Use it where appropriate.
With this change, EBCDIC logic was tweaked so that ap_checkconv() does
not overlay a translation handle previously stored (e.g., by a module)
unless it is turning translation off. Unless ap_checkconv() determines
that translation is inappropriate, it should leave the translation handle
alone.
Ryan Bloom [Tue, 23 May 2000 21:04:03 +0000 (21:04 +0000)]
Convert ap_proc_t to a complete type. This lets us access the pid directly.
Only the prefork MPM has been ported so far, the rest of the Unix MPM's are
coming later today.
Ryan Bloom [Mon, 22 May 2000 17:05:23 +0000 (17:05 +0000)]
Remove ap_destroy_context from Apache 2.0. With the name change back to
ap_pool_t, this function doesn't make sense. This also changes all
references to ap_destroy_context back to ap_destroy_pool.
Ryan Bloom [Mon, 22 May 2000 02:57:44 +0000 (02:57 +0000)]
Fix the config parser so that if there is no current node, and we are
evaluating an EXEC_ON_READ directive, and the directive's sub_tree is empty,
we don't try to set the node's parent pointer. This stops a seg fault.
Submitted by: Jeff Trawick
Ryan Bloom [Fri, 19 May 2000 23:13:31 +0000 (23:13 +0000)]
Make Apache and APR use the same flags to specify maintainer mode. I
chose to use --with-maintainer-mode, because that flag can be passed down
using AC_CONFIG_SUBDIRS. I couldn't find any easy way to pass environment
variables to configure scripts called from within Apache's configure.
Current and clean make files for Win95. Changes Include:
All projects link incrementally with no link maps in Debug mode.
New cvstodsp6.pl and dsp6tocvs.pl will fix up /the /ZI - /Zi issue.
Includes corrections noted by Tim Costello
Fixes to allow Apache to run as a Win95 service... highlights
main_win32.h : Moved delarations to a header, by request
ap_listen.h : References types declared in http_config.h
http_main.h : Add the Win32 flavor entry point declaration
apr.hw : Cleanup the redundancy department of redundancy
win32/proc.c : Double null termination was required here
Everything else should be obvious and isolated to Win32.
Build files will be committed seperately.
Jeff Trawick [Fri, 19 May 2000 02:18:06 +0000 (02:18 +0000)]
ab: Fix a command-line processing bug; track bad headers in
err_response; support reading headers up to 2K. (In the
original patch it was 8K instead of 2K; it isn't clear to me
that 8K is really needed or appropriate.)
Submitted by: Ask Bjoern Hansen <ask@valueclick.com>
Reviewed by: Jeff Trawick
Ryan Bloom [Thu, 18 May 2000 23:25:06 +0000 (23:25 +0000)]
First function removed from Unix MPM's and moved to a common file. This
work is not anywhere near finished, but the cleanup has begun at least.
Had to make a couple of variables non-static, so a name change was required
since they are now viewable from outside the library. The advantage to this
is code that is much easier to maintain into the future, because it is
duplicated less often.
Jeff Trawick [Thu, 18 May 2000 14:11:23 +0000 (14:11 +0000)]
The following is a patch to fix Dirk's patch from March 14 so that
mod_rewrite will work without caveats. Basically Dirk was just
dropping patterns of the form ${x} if x didn't resolve to an
environment variable. That breaks mod_rewrite since mod_rewrite
uses the same syntax for some of its non-environment directives.
The patch below simply puts the behavior for unresolved values back
to what it was before Dirk's patch. If it is unresolved, it is just
left in the directive as is. Further processing will handle the value.
Dirk's optimization still holds if x is resolved. A small price is paid
if x is not resolved, but that shouldn't happen often.
(Note: some tweaks to the comments were negotiated offline after Paul
posted the patch to new-httpd.)
Submitted by: Paul Reder <rederpj@raleigh.ibm.com>
Reviewed by: Jeff Trawick
Jeff Trawick [Thu, 18 May 2000 11:39:44 +0000 (11:39 +0000)]
Get dexter building/running on OS/390 (same changes as those
made to mpmt_pthread previously):
. don't include netinet/tcp.h if you ain't got it
. handle OS/390 flavors of pthread_sigmask() and
pthread_attr_setdetachstate()
Jeff Trawick [Thu, 18 May 2000 02:17:30 +0000 (02:17 +0000)]
Fix problem where the Unix mpms had an unitialized variable for
child exit status by adding an exit status parameter to
ap_wait_all_procs(); with this change, the mpms use
ap_wait_all_procs() more like they previously used waitpid().
With the introduction of the exit status parameter, the definition
of ap_wait_t was moved from Apache to APR. There was some handling
of union wait for the type of the exit status parameter to waitpid()
which I retained (but cannot test). For WIN32, ap_wait_t was defined
as int (in apr.hw). No current Windows code uses ap_wait_t, but a
type is required so that references to ap_wait_t in apr_thread_proc.h
can compile on Windows.
Note: There is still a storage leak in the way that the Unix mpms call
ap_wait_all_procs()... this will be resolved at some later time.
Ryan Bloom [Wed, 17 May 2000 23:30:21 +0000 (23:30 +0000)]
This commit will most likely break everybody on Windows. The .dsp
files I am checking in though will build a usable Apache on Windows.
This finishes at least the first round of the merge work to get the
common code into common files in APR.
Jeff Trawick [Wed, 17 May 2000 03:19:38 +0000 (03:19 +0000)]
include translation information in the request_rec;
finish converting ap_bsetflag(B_ASCII2EBCDIC or B_EBCDIC2ASCII) to
ap_bsetopt(BO_WXLATE or BO_RXLATE)
Cleanup ap_config.h fallout for Win32. Only a few very minor
changes to ap_config.h and util.c, but they might hurt someone...
please watch those two carefully.
Radical overhaul of the Apache-2.0/Win32 mpm <-> service schema.
1) Services and Registry are not part of the core Apache operations,
so registry.c and service.c are moved into Apache.exe - assuring
the service control layers of NT and 95 are truly isolated.
2) Isolation can't be complete, we need to know when the mpm is
fully initialized. A new pointer to a no-arg function returning
void is provided for this purpose, ap_mpm_init_complete. It is
only called if overridden with a non-NULL value prior to invoking
apache_main.
3) Control+C, Control+Break are handled on both WinNT and Win9x.
4) The window close, logoff and shutdown events are handled on WinNT.
5) The beginnings of a Win95 service startup are provided, -k startservice
but this is horribly incomplete since Win95 will NOT report shutdown.
Ryan Bloom [Tue, 16 May 2000 22:16:51 +0000 (22:16 +0000)]
Fix a bug in the EXEC_ON_READ logic. When we build a sub_tree while
reading that is the first item in a container, we have to return that tree
and set the parent pointers correctly.
Submitted by: Jeff Trawick
Reviewed by: Ryan Bloom
Jeff Trawick [Tue, 16 May 2000 17:48:58 +0000 (17:48 +0000)]
Handle some OS/390-isms dealing with pthreads:
. the types of the parameters to pthread_attr_setdetachstate()
and pthread_detach()
. the fact that sigprocmask() must be use to set a thread's
signal mask
Greg Stein [Tue, 16 May 2000 02:57:00 +0000 (02:57 +0000)]
oops. somebody snuck different names for my_error, and I goofed a sizeof().
fixed some indents.
rename some 'stat' variables to 'status'
use ap_strerror() in load_file()
Jeff Trawick [Tue, 16 May 2000 01:59:07 +0000 (01:59 +0000)]
mod_include:
. APR-ize some EBCDIC logic that translates char-by-char
. use the buff option BO_WXLATE to store a translation handle
instead of the old logic to turn on the B_EBCDIC2ASCII flag
Ryan Bloom [Mon, 15 May 2000 21:41:56 +0000 (21:41 +0000)]
Make mod_so use ap_strerror instead of the old ap_os_dso_error. The
error codes for dso's will need to be added to strerror in order for
this to work fully.
Ryan Bloom [Mon, 15 May 2000 19:21:40 +0000 (19:21 +0000)]
Commit the EXEC_ON_READ changes. This allows modules to hook into the
config file read phase. Full details are in the CHANGES file blurb.
Examples to see how this should be used are provided for <IfModule>
<IfDefine> LoadModule, AddModule and ClearModuleList expect docs in the
next day or two.
Jeff Trawick [Mon, 15 May 2000 17:51:23 +0000 (17:51 +0000)]
util_ebcdic.h, util_ebcdic.c, http_core.c:
tweak ap_checkconv() for 2.0
buff.c:
fix typo in comment
util_md5.h:
change CHARSET_EBCDIC to APACHE_XLATE
util_script.c:
APR-ize some character set conversion (EBCDIC only)
Tony Finch [Fri, 12 May 2000 13:14:48 +0000 (13:14 +0000)]
Update to the media types as of 2000-05-12. I also added the non-clashing
filename extensions for the WAP types, as discussed in the "WAP/WML" thread
starting with Message-ID: <391696E0.4D0D6161@Golux.Com>
Obtained from: ftp://ftp.isi.edu/in-notes/iana/assignments/media-types
Bill Stoddard [Fri, 12 May 2000 00:43:43 +0000 (00:43 +0000)]
Win32: Some cleanup of winnt.c. Retry AcceptEx on failure in preparation for
socket reuse patch. Sometimes the recycled accept socket will not work; need
to handle this case by closing it and obtaining a new one.
Jeff Trawick [Thu, 11 May 2000 21:56:51 +0000 (21:56 +0000)]
src/build/build2.mk: build PCRE's configure script if needed (when you
run buildconf, for example)
src/Makefile.in : re-order libpcreposix.la and libpcre.la to make
OS/390's binder happy (now the libraries are listed
in order of dependencies)
Bill Stoddard [Thu, 11 May 2000 21:17:00 +0000 (21:17 +0000)]
Create new function, ap_lingering_close(), which will explicitly do a lingering close
if USE_SO_LINGER is not defined. Move responsibility for closing connections out
of http_connection.c and into the MPMs.
Tony Finch [Thu, 11 May 2000 20:25:46 +0000 (20:25 +0000)]
Add mod_example to the build system.
I also fixed a few bogosities in mod_example itself, mostly improved
ordering of the code; I also fixed the long-standing numbering mistake
for the order of the request processing stages, and added the hook
registering function to the module record.