Jeff Trawick [Tue, 30 May 2000 14:20:46 +0000 (14:20 +0000)]
Ensure that the proper translation handle (if any) is used when
sending the canned response document to the client. Otherwise, the
client may get garbage depending on the translation in effect.
Ronald Tschalar [Mon, 29 May 2000 08:57:18 +0000 (08:57 +0000)]
Brought mod_auth_digest up to synch with 1.3, fixed ap_time_t-related
bugs, and changed shmem/locking to use apr API. Shared-mem is currently
disabled, however, because of problems with graceful restarts.
One last precursor to the common code base for Win32 rewrite_args from
it's MPM. Since we need to walk the arg list... why maintain it in
several places. This patch adds the AP_SERVER_BASEARGS definition to
the header, so any mpm (and mod_info, for example) can know what args
are legitimate, even when they plan to ignore them.
Remove any possiblity of having multiple tags to correct as the version
changes. Split httpd.h's version into tokens. Roll these tokens into
registry.c
TODO: Remove registry.c from the list of files to touch when rolling
Jeff Trawick [Sun, 28 May 2000 11:48:24 +0000 (11:48 +0000)]
mod_cgi: Restore logging of stderr from child process when ScriptLog
isn't used (as in 1.3), except that on Unix it is now logged via
ap_log_rerror() instead of by the child having STDERR_FILENO refer
to the error log.
Submitted by: Greg Ames
Reviewed by: Jeff Trawick
Kill the Win32 library project ap.dsp and slide http_main.c from the
ApacheCore.dsp into Apache.dsp - this is in prepartion of the real
services update, which will move registry.c and service.c back into
ApacheCore.dsp, kill both headers and incorporate their symbols into
the mpm/winnt/winnt.h file. main_win32.c will die as well, with it's
few remaining functions moving into the mpm.
/D(efine) STATIC to suppress warnings since pcreposix is statically
linked to pcre. ApacheCore would have to be touched as well, except
that we don't override pcre_malloc or pcre_free. If we do so, the
STATIC symbol is too broad, and aught to be changed in Apache's
public src/include/pcre.h headers.
Cleanup MSVC .dsp build for support/ files. Give all support/ .dsp's
the GCD configuration. The entire Win32 environment now builds, but
I'm sure that will be fixed soon :-)
Prevent the .dsp project files from being touched if they were
already cleanly converted. Note that just loading the 6.0 .dsp
in the 5.0 MSVC environment doesn't toggle the /ZI->/Zi option.
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