Parent Directory
|
Revision Log
| Links to HEAD: | (view) (annotate) |
| Sticky Revision: |
Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath with a single Mutex directive. Add APIs to simplify setup and user customization of APR proc and global mutexes. (See util_mutex.h.) Build-time setting DEFAULT_LOCKFILE is no longer respected; set DEFAULT_REL_RUNTIMEDIR instead. Some existing modules, such as mod_ldap and mod_auth_digest gain configurability for their mutexes.
Fix usage message on the Windows platform. - do not include graceful commands and duplicate start|restart|stop - add ServerRoot to the parameters encapsulated by "-n"
main() can use ap_run_mpm() directly, so axe the old ap_mpm_run() function change the mpm hooks to return OK/DONE instead of 0/1
stop exporting APACHE_MPM_DIR to modules -- unclear why this was ever necessary, and it makes no sense with loadable MPMs axe the unnecessary MPM_DIR build variable move the stray APACHE_SUBST(MPM_LIB) from configure.in to server/mpm/config.m4, where the other MPM_foos are handled
resurrect the call to show_mpm_settings(), but defer the entire -V processing until after module loading if there is no built-in MPM (we could just defer displaying the MPM info, but that would change the order of output from what people/scripts expect)
Provide ap_set_retained_data()/ap_get_retained_data() for preservation of module state across unload/load. The existing idiom used by modules to associate userdata with pglobal doesn't work in the earliest phases of module execution. (This does expose pglobal as an implementation detail, but it would be great to unexpose it if at all possible (but modules already have access to pglobal at almost all stages of execution anyway).)
set ap_server_conf as early as possible; axe the duplicate variable
axe the remaining checks of AP_MPM_WANT_foo to see what code to generate MPMs no longer provide those definitions (the signal server support is an interesting problem, since it has to be known before loading loading the MPM)
Introduce a new set of APIs to allow MPMs to be proper modules instead of integral parts which share global variables, functions, and macros with the rest of httpd. Converted now: prefork, worker, event, simple, WinNT* *WinNT hasn't been built or tested, and relies on a hack to include the WinNT mpm.h to disable Unixy MPM support routines in mpm_common.c
API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
* Give possible piped loggers a chance to process their input before they get killed by us.
* server/main.c: Unbreak the build.
Remove all references to CORE_PRIVATE.
Avoid calling access control hooks for internal requests with configurations which match those of the initial request. Revert to the original behaviour (call access control hooks for internal requests with URIs different from the initial request) if any access control hooks or providers are not registered as permitting this optimization. Introduce wrappers for access control hook and provider registration which can accept additional mode and flag data. The configuration walk optimizations were originally proposed a while ago (see http://marc.info/?l=apache-httpd-dev&m=116536713506234&w=2); they have been used since then in production systems and appear to be stable and effective. They permit certain combinations of modules and clients to function efficiently, especially when a deeply recursive series of internal requests, such as those generated by certain WebDAV requests, are all subject to the identical authentication and authorization directives. The major change from the original proposal is a cleaner mechanism for detecting modules which may expect the old behaviour. This has been tested successfully with Subversion's mod_authz_svn, which specifically requires the old behaviour when performing path-based authorization based against its own private access control configuration files.
Flesh out ap_expr with: * Re-usable parse trees * Canonical string parser function (candidate)
make sure we Unix weenies get a newline at the end of the message instead of our shell prompt don't be overprotective of apr_ctime() by giving it more memory than it requires or nuking a newline which isn't there
Add a comment to prevent a future upgrade of APR 2.0 or similar from inflicting new fatal errors on the startup error reporting.
main core: Emit errors during the initial apr_app_initialize() or apr_pool_create() (when apr-based error reporting is not ready). This moves apr_app_initialize() into init_process (and indirects the argv/argc parameters for this function) since the same error logging is appropriate to either failure. Note the change of the internal name create_process to init_process, since create_process means something very different in apr-land. (Replaces the misapplied commit r568762, already backed out).
Revert r568762; will reapply in two segments
Eliminate an XXX; apr-based file logging isn't available to report failures of apr_app_initialize() nor the very first apr_create_pool.
Revert r547987 ("svn merge -c -547987 .")
Block ap_pid_table create with same define as used in mpm_common.c
PID table impl: parent process keeps a local table store of Apache child process PIDs and uses that to check validity of what's in the scoreboard.
Replace ap_get_server_version with ap_get_server_banner() and ap_get_server_description(). High-level summary: The full server version information is now included in the error log at startup as well as server status reports, irrespective of the setting of the ServerTokens directive. Third-party modules must now use ap_get_server_banner() or ap_get_server_description() in place of ap_get_server_version().
Introduce a check_config phase between pre_config and open_logs, to allow modules to review interdependent configuration directive values and adjust them while messages can still be logged to the console. The open_logs phase is already used somewhat for this purpose by certain MPMs (winnt, prefork, worker, and event) but only by forcing their functions ahead of the core ap_open_logs() function, and since this phase runs after the ap_signal_server function during startup, it can not be used to generate messages on the console when restarting. Add the check_config phase to mod_info and mod_example. Handle relevant MPM directives during this phase and format messages for both the console and the error log, as appropriate. Bounds and sanity checks on the values of the MPM directives are handled in sequence in this phase instead of in the various directive handling functions, since those functions (e.g., set_max_clients()) may not be called at all if their directives do not appear in the configuration files, and even if they are called, there is no guarantee that this will occur in any particular order. Remove from the worker and event MPMs the code in the pre_config phase that alters the configuration node tree by re-ordering ThreadsPerChild ahead of MaxClients. This code is effective but insufficient; for example, if ServerLimit follows MaxClients, the test against server_limit in set_max_clients() is invalid. (In practice, this only results in incorrect or absent warnings on the console, because server_limit is set to its configured value when the main loop re-runs the configuration process.) Prevent ap_threads_per_child from exceeding thread_limit in the winnt, worker, and event MPMs. This situation could occur if ThreadsPerChild was not specified in the configuration files and ThreadLimit was set to a value smaller than DEFAULT_THREADS_PER_CHILD, because set_threads_per_child() would never be called and therefore its bounds check against thread_limit would not be performed. Remove from the winnt, prefork, worker, and event MPMs the changed_limit_at_restart flag. Set the first_server_limit and first_thread_limit values during the first execution of the check_config function, and use them to detect changes to ServerLimit and ThreadLimit across restarts and issue appropriately formatted warnings. Remove the comments about the error log being a "bit bucket"; this was true when the code was originally committed in r92530 but that was due to a bug fixed in r92769. Be consistent about setting all MPM configuration directive values in the pre_config phase. Rephrase and reformat the console and log file messages relating to MPM configuration directives to be consistent across all MPMs. Use briefer messages when logging to the error log than to the console. Update miscellaneous stale comments and messages (e.g., reference to daemons_min_free in worker and event MPMs, "prefork open_logs" in winnt MPM, and StartServers in netware MPM). The winnt, netware, beos, and mpmt_os2 MPMs should be tested by developers with access to those platforms, especially the winnt MPM, which has unique logic with respect to distinguishing between parent and child processes during the configuration phases. Update the English documentation for the worker MPM's ThreadsPerChild directive, which no longer needs to precede other MPM directives in the configuration files if it has a non-default value. The German (.de) and Japanese (.ja) translations should be updated by developers fluent in those languages.
update license header text
* server/main.c (abort_on_oom): New function. (create_process): Set abort callback for process pool. (main): Set abort callback for global pool. Reviewed by: colm
Update the copyright year in all .c, .h and .xml files
With all of the, uhm, interesting manners in which httpd can be built and installed, let's ensure httpd -V gives the reporter a chance to identify the APR flavor used to compile and to run httpd when reporting bugs.
No functional Change: Removing trailing whitespace. This also means that "blank" lines consisting of just spaces or tabs are now really blank lines
httpd.exe/apachectl -V: display the DYNAMIC_MODULE_LIMIT setting (1.3 has done that for a while)
* server/main.c (suck_in_APR): Remove weird gzeof reference which broke all the -Werror builds.
Doxygen fixup / cleanup submited by: Neale Ranns neale ranns.org reviewed by: Ian Holsman
Move the "GracefulShutdownTimeout" directive into mpm_common, for re-use with other MPM's.
Make the neccessary changes to mpm_common and main to support a graceful-stop command line argument.
* server/main.c: Remove the suck_in_apr_password_validate() hack. apr_password_validate is part of the public APR interface and this hack should not be needed on any platform.
Update copyright year to 2005 and standardize on current copyright owner line.
general property cleanup
Implement -t -DDUMP_MODULES using generic test_config hook rather than hooking into mod_so from main.c: * include/http_config.h, server/config.c: Declare test_config hook. * server/main.c: Drop hooks into mod_so; run test_config hooks. * modules/mappers/mod_so.h: Drop ap_dump_loaded_modules optional function. * modules/mappers/mod_so.c (dump_loaded_modules): Renamed from ap_dump_loaded_modules; only run if -DDUMP_MODULES is defined. (register_hooks): Register test_config hook instead of optional function. Reviewed by: Justin Erenkrantz, Paul Querna
fix compiler warnings
Add DUMP_MODULES
Add OS and APACHE_MPM_DIR to -V output
initialize server arrays prior to calling ap_setup_prelinked_modules so that static modules can push Defines values when registering hooks just like DSO modules can Submitted by: philippe chiasson Reviewed by: geoff
changed the following APIs to return an error instead of hard exiting: ap_add_module, ap_add_loaded_module, ap_setup_prelinked_modules, and ap_process_resource_config
Don't include newlines in strings passed to ap_log_error.
fix name of The Apache Software Foundation
fix copyright dates according to the first check in
apply Apache License, Version 2.0
ap_log_error() prints its own newline, so none is needed. Instead, the \\n was escaped and produced an ugly output
PR:
update license to 2004.
* server/main.c (suck_in_expat): Remove function, USE_EXPAT is never defined.
Clean up httpd -V output: Instead of displaying the MPM source directory, display the MPM name and some MPM properties. Submitted by: Geoffrey Young <geoff apache.org> Reviewed by: Jeff Trawick
tidy up some charset recoding issues the "need" for APACHE_XLATE went away some years ago when BUFF went POOF and charset recoding (translation) of non-protocol data could no longer be performed by the core...
Documentation says -DDUMP_VHOSTS is equivalent to setting -S
switch to APR 1.0 API (which is still in flux) because of the changes to the argument lists of apr_mmap_dup and apr_socket_create, 2.1-dev won't build with apr and apr-util's 0.9 branch anymore
add a hint about handling of IPv4-mapped IPv6 addresses to the output of httpd -V
Allow restart of httpd to occur even with syntax errors in the config file. (Out-of-date DSOs with bad MMNs will still be fatal unfortunately.) Add return parameter to ap_process_config_tree - OK on success, !OK on syntax error. We will no longer call exit() from ap_process_config_tree. The caller must exit if there is an error (makes sense anyway). This allows the initial start-up code to delay the exit until trying to let the signal_server optional function execute first. (The chances are that the syntax error isn't in the PidFile directive. If that happens, we'll try the default one. Oh, well.) PR: 16813
finished that boring job: update license to 2003. Happy New Year! ;-))
Enabled the -n parameter on NetWare to allow the administrator to rename the console screen
don't use deprecated function apr_sort_hooks()
Add -S as a synonym for -t -DDUMP_VHOSTS Submitted by: Thom May <thom@planetarytramp.net> Reviewed by: Aaron Bannert
We log this failure (with an identical message) in the restart loop code, there's no reason not to note it in the preflight pass.
suck_in wasn't sucking hard enough. Fixed the header.
Doc it.
-T hasn't been supported for some great while.
Fix the display of the default name for the mime types config file. PR: 9729 Submitted by: Matthew Brecknell <mbrecknell@orchestream.com> Reviewed by: Jeff Trawick
the "-k startssl" parameter is reverted by popular demand
issue the usage message if there are extraneous arguments on the command line
Add "-k start|startssl|restart|graceful|stop" support to httpd for the Unix MPMs. These have semantics very similar to the old apachectl commands of the same name. The use of stderr/stdout and exit status for error conditions needs to be revisited. For now it matches apachectl behavior. Justin Erenkrantz got the ball rolling with this feature. Some of his support code was used unchanged. Other code was shuffled around and modified or rewritten.
fix a spelling error in a comment
Omit the second linefeed after "Syntax OK" Submitted by: Joe Orton <jorton@redhat.com>
stop using APLOG_NOERRNO in calls to ap_log_?error()
Introduced -E startup_logfile_name option to httpd to allow admins
to begin logging errors immediately. This provides Win32 users
an alternative to sending startup errors to the event viewer, and
allows other daemon tool authors an alternative to logging to stderr.
Correct const'ness of argv in all support apps, and use the new apr_app_initialize over apr_initialize for win32, and other platforms that may wish to tweak 'apr-ized' application support (e.g. Netware?)
Added support for Posix semaphore-based mutex locking (AcceptMutex posixsem). It's between pthread and sysvsem in the DEFAULT priority ranking. This makes it the new default for Darwin, and adds support for it for other platforms as well (like Solaris). PR: Obtained from: Submitted by: Reviewed by:
Integrate rbb's forward port of -k config into the -h(elp), and reorder some directives in the -h(elp) so they 'flow'.
Tag some pools
Update our copyright for this year.
Style Police comming through...
For fat-fingered friends and others who like typing err and warn rather than spelling it out on the -e argument.
This comment is bogus since we decided to keep -X. Obtained from: Thom Park <tpark@borland.com>
NOERRNO? Of course we have an ERRNO :)
This patch allows the prefork MPM to print messages to the console if it can't open a socket for some reason.
The pre_config hook now takes a return value. This allows modules to cause the server to bail out under error conditions.
get the declaration of strcasecmp() on AIX
Allow the user to get detailed debugging information without a full recompile [absolutely necessary on Win32 and other platforms that really don't support administrator-compilation.] -e level follows the LogLevel options. The only question, should -e override the compiled-in default for the creation of the server_rec? No strong feeling either way, here.
Restore the apr_pool_clear calls to main.c in case we have third-parties who are overriding the open_logs hook, in which case they'd miss the plog being cleared. Submitted by: Justin <jerenkrantz@apache.org>
This small patch modifies the log's to use plog instead of pconf. Basically pconf is cleared at different times from plog, and this has the effect of leaving stderr closed when going into the next stage of the config. This also had the effect of allowing FreeBSD with threads to create a pipe with stderr's fd at one end, and this resulted in problems with the signal polling and high cpu usage. In addition, move the clearing of plog from main.c to core.c where it seems more appropriate. This solves the first and main problem that FreeBSD has with the threaded MPM's.
tag a few of the key httpd pools
hmmm... gcc 2.95.2 on AIX says sizeof is long... fix up a printf to always have a match between the format string and argument
tweak httpd -V output to show the architecture (bits in a pointer) and whether or not APR_HAS_SENDFILE is defined
Handle the ? option.
Finish undoing that last patch... previous commit simply cleaned it up, I was working with an unsaved verison when I pushed the button.
Revert my last patch to detect a 'leftover' arg. Apparently there is no way to distinguish between an extra arg, and a -x foo arg, or else our getopt is broken at the moment. I can't dig further into getopt right now, so this will wait for another day or another hacker to resolve.
We never tested for invalid 'additional' arguments that were ignored. Was there any point to allowing additional, unused args after the various supported switches? This prevents the Apache server from starting with an httpd somefooness invocation.
carry over from 1.3: disable profiling in the parent process #ifdef GPROF PR: Obtained from: Submitted by: Reviewed by:
change open_logs hook to return a value, allowing you to flag a error while opening logs Obtained from: Doug MacEachern
Modify post_config hook so that it can return a error, causing the server not to start. previous method was to call exit(1) which would not fail gracefully PR: Obtained from: Submitted by: Reviewed by: (Idea only Jeff Trawick)
Debug conf pool constness. This is a noop most of the time on most platforms, but it's only called twice per restart, so this is mostly harmless.
Add -X functionality back to httpd. - Updates upgrading.html - Reverts Aaron's earlier docco patch (sorry...) - Adds -X to all mpms in the tree
Moved util_uri to apr-util/uri/apr_uri, which means adding the apr_ prefix to all of the uri functions (yuck), changing some includes, and using APR error codes instead of HTTP-specific error codes. Other notes to test this patch: - You need to delete the util_uri.h file - exports picks up on this. - I'd like to remove the apr_uri.h from httpd.h, but that might increase the complexity of this patch even further. Once this patch is accepted (in some form), then I can focus on removing apr_uri.h from httpd.h entirely. I need baby steps (heh) right now. - I imagine that this might break a bunch of stuff in Win32 or other OS builds with foreign dependency files. Any help here is appreciated. This is a start... -- justin Submitted by: Justin Erenkrantz Reviewed by: Roy Fielding
Fix command-line processing so that if a bad argument is specified Apache will exit.
Module writers for 2.0 shouldn't still be relying on a no-op for compatibilities' sake. Let's kill ap_util_uri_init, since it serves no purpose now.
clean out some old crud from ap_config.h
remove ap_{post_config,child_init}_hook
replace usage with ap_run_{post_config,child_init}
PR:
Obtained from:
Submitted by:
Reviewed by:
Oops - better *think* first. Fix typo. PR: Obtained from: Submitted by: Reviewed by:
Display APACHE_MPM_DIR in the list of #defines, and remove the duplicate APR_HAS_MMAP test.
rename miss: s/apr_clear_pool/apr_pool_clear/g
Update copyright to 2001
*) remove some obsolete/unused defines from httpd.h. *) remove DEFAULT_XFERLOG from main.c; it is never set/used *) move ap_get_max_daemons() to ap_mpm.h *) move DEFAULT_LISTENBACKLOG to mpm_common.h
Clean up some of the includes: - explicitly include apr_lib.h since ap_config.h doesn't - use apr_want.h where possible - use APR_HAVE_ where possible - remove some unneeded includes
renaming various functions for consistency sake see: http://apr.apache.org/~dougm/apr_rename.pl PR: Obtained from: Submitted by: Reviewed by:
Add support for type-safe optional functions.
Back out the last change (the one that went in without a commit log) I thought this change was necessary to stop reporting the SERVER_VERSION twice. In reality, the apr_hook_deregister_all() call in ap_clear_module_list solved that problem.
PR:
The big change. This is part 3 of the apr-util symbols rename, please see the first commit of srclib/apr-util/include (cvs apr-util/include) for the quick glance at symbols changed.
Provide apr_pool_t arg to register_hooks, since anything they do in that step -must- be done with a pool that will not outlive the cmd pool, from which they may have been dynamically loaded. This needs further review, it's committed only as a stopgap for those who's builds I broke, sorry. Review tbc late this evening.
Set up stderr logging explictly early in initialization so that a pool is available for creating the APR representation of stderr.
Remove AP_USE_MMAP_FILES, it doesn't really control anything anymore. Now we just use APR_HAS_MMAP directly, just like APR-util does.
Switch to the APR-provided APR_CHARSET_EBCDIC feature test macro.
Force all Apache functions to be linked into the executable, whether they are used or not. This uses the same mechanism that is used for APR and APR-util. This may not be the correct solution, but it works, and that is what I really care about. This also renames CHARSET_EBCDIC to AP_CHARSET_EBCDIC. This is for namespace correctness, but it also makes the exports script a bit easier.
Get -t -D DUMP_VHOSTS working and properly documented. This removes the -S option from the docs.
Display whether or not APR (and thus Apache) supports IPv6 in the httpd -V output.
*) 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
Add "-D PROCESS_LOCK_IS_GLOBAL" to the httpd -V output when appropriate.
Use "const char * const *" for process->argv (which is the correct const-ness since we sometimes put "some string" in there, and also the CRT's argv). propagate this change within http_main and mpm/winnt/ (also correct some other const type usage within the MPM). fix ab's call to parse_url() which removed a const to actually manipulate an arg from the CRT's argv (indirectly via opt->arg). no idea how this has avoided segfaulting.
*) Compensate for recent changes in the APR headers. Specifically, some files need to specifically include stdio.h, or a particular apr_*.h header. *) Adjust callers of apr_create_process() to deal with the extra "const" *) Add "const" to args of ap_os_create_privileged_process()
Extern symbols (per the warning) belong elsewhere, since (on Win32) the http_main.c is both the startup and entry stub.
Port mod_info to 2.0. This is basically a complete re-write to use the config tree instead of re-reading the config file. As a part of this change, the config tree needs to be exposed to modules as ap_conftree. Submitted by: Ryan Morgan <rmorgan@covalent.net> Reviewed by: Ryan Bloom
Fix type complaints on Xlc. Submitted by: Victor J. Orlikowski <v.j.orlikowski@gte.net>
Create a feature macro that determines if Autoconf was used to configure the server. The ap_ugly_hack variable is only valid if Autoconf was used for the configuration.
Get win32 building again... we need something just a little more sophisticated here Submitted by: John Sterling <sterling@covalent.net Reviewed by: rbb, wrowe
This is an ugly little hack to allow DSO modules to work. This basically forces Apache to link in all of the APR functions whether they are used by any static modules or not.
Namespace protect the rest of the macros defined by ap_config.h
Remove a needless cast. Submitted by: Victor J Orlikowski <v.j.orlikowski@gte.net> Reviewed by: dreid@apache.org
Provide the first real-world update for the new apr_initopt/apr_getopt changes. PR: Obtained from: Submitted by: Reviewed by:
Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation... see src/lib/apr/apr_compat.h for most details. Also a few minor nits to get Win32 to build. PR: Obtained from: Submitted by: Reviewed by:
prefix libapr functions and types with apr_
Move all APR functions related to strings to their own directory, and create a new header for those functions. This is the first step to removing the apr/lib directory completely, and moving those files/functions to descriptive directories.
#ifdef APR_HAS_OTHER_CHILD to #if APR_HAS_OTHER_CHILD. Not tested.
Fix a couple of problems with the pre/post config processing changes: 1) symptom: on system with bad/no DNS setup, ServerName isn't processed so init fails cause: ap_fini_vhost_config() called before ap_process_config_tree(), so ServerName was never stored in the config structure 2) symptom: on system with virtual hosts configured, SIGSEGV in open_multi_logs() cause: the module configs for the virtual hosts haven't been merged in yet, and open_multi_logs() gets NULL for the mod_log_config configuration This stuff needs to be cleaned up further, exploring the use of a post-config hook for fixup_virtual_hosts(), ap_fini_vhost_config(), and ap_sort_hooks(), getting a lot of logic out of main(), and processing the config tree only once.
Cleanup more of the Apache configuration. This removes all of the shared memory checks, because Apache relies completely on APR for shared memory support. In doing this, we also need to know how APR/MM are providing our shared memory (ie file or memory) that requires the change made to APR's configure script that was just committed.
httpd -V now displays APR's selection of the lock mechanism instead of the symbols previously respected by prefork.
Remove all occurances of gettimeofday. Replace it with ap_now which provides the same function but works cross-paltform.
PR: Obtained from: Submitted by: Reviewed by: Unbind the old main_win32.c code and rebind to the new mpm logic in the modules/mpm/winnt directory. Includes some simple cleanups. The old sources in os/win32 will disappear at the end of this week.
Modify the config order so that we read the config, process all EXEC_ON_READ directives at the same time, run pre_config hook for all modules, and then walk the tree. This allows all modules to have a pre_config hook and know that it will be called at a reasonable time. I also made "Include" an EXEC_ON_READ directive so that it is included in the tree properly. This was required after the other changes that were made.
Remove a warning when compiled with --use-maintainer-mode. Basically, process_rec should just be storing argv the same way that getopt expects it.
PR: Obtained from: Submitted by: Reviewed by: How, precisely, was Apache going to do anything with rewritten args ;-? +1 on my personal oh-duh tally for the weekend.
PR: Obtained from: Submitted by: Reviewed by: 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.
PR: Obtained from: Submitted by: Reviewed by: Finally a patch that can't (well, shouldn't :-) break any other platform. Open up the symbols defined for http_main.c to move main() from the core under Win32 (that's the real main(), not that apache_main() thing). Win32 Project file changes will follow in a seperate patch.
PR: Obtained from: Submitted by: Reviewed by: Document the lack of exports so http_main.c stays that way, as suggested by Greg Stein.
PR: Obtained from: Submitted by: Reviewed by: 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.
Add "-D APACHE_XLATE" to the output of httpd -V when APACHE_XLATE is defined at compile time.
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.
generic EBCDIC support code, changes to rfc1413.c to use APR translation in its EBCDIC support
Make reliable piped logs work on 2.0.
Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages on Linux, but probably breaks somewhere.
more namespace cleanup
Update to Apache Software License version 1.1
Fix the warnings associated with the pre_config patch.
Put the pre_config hook back into the table. This solves the problem of the pre-config hook only being valid for MPM's. This patch also distinguishes between STANDARD modules and MPM's.
Tweaked APR initialization and termination so that the lifetime of memory management mutexes is longer than the lifetime of managed memory. APR apps must now call ap_terminate().
Clear hook registrations between reads of the config file. When DSOs are unloaded and re-loaded the old hook pointers may no longer be valid. This fix eliminates potential segfaults.
axe code to print "-D MULTITHREAD" for apache -V; MULTITHREAD is a 1.3 hangover; exit with a log message if ap_create_context() fails when creating the initial context; otherwise, we SIGSEGV later
Eliminate implicit usage of access.conf and srm.conf.
This gets the server working again after Ryan's order change for ap_getopt.
Fix all the License issues. Including: s/Apache Group/Apache Software Foundation/ s/1999/2000/ s/Sascha's license/ASF license
Remove second ap_initialize left over from previous patch. Submitted by: Jeff Trawick Reviewed by: Ryan Bloom
2.0 builds, but dumps core on FreeBSD 3.3 (ap_lock). Basically, ap_initialize() needs to get called before create_process(), since create_process() passes op_on structure to semop() to get a lock, but op_on isn't initialized until ap_initialize() calls setup_lock(). Here is a slight rearrangement to main() which calls ap_initialize() earlier... Submitted by: Jeff Trawick <trawick@us.ibm.com> Reviewed by: Bill Stoddard <stoddard@us.ibm.com>
Rework the code to handle apache -k shutdown|restart. The fundamental problem being solved here is determining the best way to discover the Apache parent process PID (stored in the location specified by the PidFile directive). This patch attempts to read the config file directly to determine the pidfile and avoids going through the motions of calling all the module initialization routines. This patch will not work if the pidfile directive is in a file pointed to by an include directive. Not sure is this is a common case or not on Windows. If it is, it is easy enough to add a bit more code to follow include directives. An interesting modification would be to detect the presence of a \ -C directive containing a pointer to the pidfile: E.g., apache -k restart -C "pidfile d:/mypidfile". Let's keep it simple for now and see what happens.
APR requires that ap_initialize is called as one of the first functions. It sets up the rest of the APR types. This was causing lockups whenever we tried to us an APR lock.
Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is defined correctly in all C files.
Finish the commits for the change in the header files. Basically, this hides all of the Apache macros that modules don't need access to. This should have been committed with the modules, but I wasn't paying attention to the directory I was in when I ran the commit. Submitted by: Manoj Kasichainula and Ryan Bloom
Get rid of the C++ style comment.
Handle -k restart|shutdown command line option from http_main.c
Eliminate ap_config.h's checks when using autoconf. Now, ap_ac_config.h is used instead, and autoconf's configure script will check for everything else.
Clean up the getopt stuff a bit. Basically, I am removing the #define's, and changing the names in the getopt.c file so that we are sure there is no namespace collision between regular getopt's, and APR's getopt.
Use APR's getopt
First step in removing the fprintf(stderr problem from Apache. Basically, I defined APLOG_STARTUP, which refrains from printing the date string and the log level information in log_error_core. I then changed all the fprintf(stderr calls to ap_log_error, and used APLOG_STARTUP. log_error_core on Unix takes care of creating a log file and directing it to stderr if a log file isn't already active. I will continue to make these changes tomorrow. Currently, the main code and the dexter mpm have been modified.
Get rid of dependency on os/win32/getopt.c & .h
Use APR's getopt.
Remove all but one WIN32 from http_main. Other minor changes.
Fix typos
ap_server_argv0 was undefined. Use a simple default (basename(argv[0]))
Well this was thought provoking. Drive out the use of malloc in two places. In listen.c, using the global process pool instead. That changes the API into listen so that a process is passed in rather than the config pool. That's all was easy. The pain is propogating a change into all N of the mpm, they are all similar but different in their use of listen.c There is a lot to dislike about similar but code scattered code. I changed the N setup_listener routines, they now take only the server since they can dig the config and global pool out of there. Free today: ap_setup_prelinked_modules now takes the process so it can allocate it's table in the process's pool rathern than use malloc.
Add process_rec to the top of {server,connection,request}_rec
hierarchy of structs that abstract server activities. Store some
stuff in process_rec (finally a place to have nearly guiltless
globals) for example the global and configuration pools. Put some
operations on process_rec in http_main, in particular the
destroy_and_exit operation, and the use it to do all the exit calls.
Change ap_read_config to operation on this "object" rather than on the
configuration pool. Modify server_rec to point to the process, so you
can get at it most all the time which should finally allow most of the
server's malloc calls to be eliminated.
There are no locks in the process struct as yet, put them in as needed.
Some of the hooks should take this rather than conf. pool.
Duh.
Changed my mind, ptemp maybe "systolic" but since it is empty during the entire time the server is serving it's best to destroy it.
Man! This file vastly improved. Thanks Dean! Use the abstraction API_EXPORT_NONSTD for exporting main (aka apache_main). Use clear rather than destroy on ptemp as other 'systolic' pools do. That also fixing a leak of the first ptemp created. Let the destroy of pglobal to all the cleanup. Meanwhile, all exit paths should destroy pglobal so the cleanup/unwind gets run and this routine sets a bad example by having many exits that don't - another day. PR: Obtained from: Submitted by: Reviewed by:
Remove obsolete ap_util_init function.
First patch to re-order function parameters. This one gets the low hanging fruit, and moves most of the result parameters to the first argument. Future patches in this series will move the rest of the result parameters to the beginning of the list, and will move the context's to the end of the list
A change to how APR uses user data. Now, user data is a linked list that is retreivable using a char string. Basically, you provide a string that will be used as a key when you store the data. If the key was used before, we will overwrite the old data. When you want to retreive your data, pass in the same key, and we will find the data you care about. This also makes it harder to put user data in when creating a context, so that option has disappeared. It is also impossible to inherit user data from parent contexts. This option may be added in later. I will be documenting this VERY soon.
Really get rid of unused options.
Changed pools to contexts. Tested with prefork and pthread mpm's. I'll check this out tomorrow and make sure everything was checked in correctly.
Make ``configure --with-option=devel'' under GCC 2.95.1 happy by avoiding various warnings...
A bunch of changes to get the server compiling on WIN32. mod_cgi, mod_include, mod_isapi and mod_so don't work so I am not making them. Moved a lot of code out of multithread.* and into os.* (didn't want to add multithread to the new repository). Much of this can be cleaned up when APR is stable. And Dean's gonna but me for sure for the http_main hit. It's may be possible to name a DLL entry point 'main()'. Just havent tried it yet. Enjoy!
Rearchitect the mess in http_main.c, http_core.c and buff.c. Basic restructuring to introduce the MPM concept; includes various changes to the module API... better described by docs/initial_blurb.txt. Created multiple process model (MPM) concept by ripping out the process guts from http_main.c and http_core.c and moving them to separate files under src/modules/mpm/ Moved socket creation stuff to listen.c. Moved connection open, maintenance and close to http_connection.c. I/O layering and BUFF revamp. Much of buff.c moved to ap_iol, iol_socket, and iol_file. See docs/buff.txt. Moved user and auth fields from connection_rec to request_rec. Removed RLIMIT stuff, supposedly to be implemented later in mod_cgi. Disabled suexec, supposedly to be reimplemented later. Submitted by: Dean Gaudet
Apache 1.3.9 baseline for the Apache 2.0 repository. Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9 Submitted by: Apache Group
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
| apache@apache.org | ViewVC Help |
| Powered by ViewVC 1.1.2 |