1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

180 Commits

Author SHA1 Message Date
Stefan Fritsch
5bcd082e3d Rename MaxRequestsPerChild to MaxConnectionsPerChild, which
describes more accurately what the directive does.

The old name still works but logs a warning.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021924 13f79535-47bb-0310-9956-ffa450edef68
2010-10-12 21:12:37 +00:00
Stefan Fritsch
8f840cb763 core: Abort with sensible error message if no or more than one MPM is
loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@987806 13f79535-47bb-0310-9956-ffa450edef68
2010-08-21 18:06:41 +00:00
Stefan Fritsch
a527986832 remove more unused variables
revove some obsolete comments

netware file is untested


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982050 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 22:12:19 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
William A. Rowe Jr
78cf8c9212 Refactor mod_status out of the ExtendedStatus toggle picture, as other
modules can and should be able to use this scoreboard information.
Rename suggestions for such a directive are welcomed.

Note that mod_status toggles the default, to present the ExtendedStatus 
for server operators, whenever it is loaded.  Docs changes to follow.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903020 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 00:05:37 +00:00
Jeff Trawick
2e9668a33d 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@883540 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:17:51 +00:00
Jim Jagielski
68dac97c61 Hmmm... forgot git commit/dcommit.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@818828 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 12:11:51 +00:00
Jim Jagielski
83532ab628 Enhance ap_hook_monitor to pass along a server_rec (in
general the ap_server_conf) and tuck away some storage
in there which may be useful as an opaque data pointer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@818825 13f79535-47bb-0310-9956-ffa450edef68
2009-09-25 11:59:30 +00:00
Brian Havard
60fbe11de1 Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 08:56:13 +00:00
Jeff Trawick
d1c3416282 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@762127 13f79535-47bb-0310-9956-ffa450edef68
2009-04-05 17:54:22 +00:00
Jeff Trawick
23ac01a833 mpm-query hook: distinguish between DECLINED and APR_ENOTIMPL so that
. ap_mpm_query() can return APR_EGENERAL if called too early (for debugging a module)
. some hypothetical module which implements the mpm-query hook can bypass the MPM
  with APR_ENOTIMPL


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760864 13f79535-47bb-0310-9956-ffa450edef68
2009-04-01 11:53:50 +00:00
Jeff Trawick
35e3599b25 the mpm_get_child_pid hook is unnecessary, as was the per-MPM MPM_CHILD_PID() macro which it replaced
axe this new hook, and use ap_get_scoreboard_process() instead


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759757 13f79535-47bb-0310-9956-ffa450edef68
2009-03-29 19:30:17 +00:00
Jeff Trawick
301f0404f5 axe unmaintained 1.3-era code to support AUX, SunOS, IRIX, Next, Tandem, MPE,
LynxOS, QNX, and UnixWare


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758944 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:32:22 +00:00
Jeff Trawick
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
Jeff Trawick
ee32468a33 remove OS/2 platform support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758929 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 23:47:52 +00:00
Jeff Trawick
2f9b9fdd70 remove BeOS OS support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758891 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 22:23:44 +00:00
Jeff Trawick
ee826b54da remove leader, perchild, and threadpool MPMs (other than non-English bits in common parts of the manual)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758613 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 12:44:48 +00:00
Jeff Trawick
e82772e29f fix mpm_get_name hook
a string can't be used as the declined value since the hook macro must compare 
retcodes from hooks with that declined value

(thanks, gcc/Joe)

accommodate in ap_show_mpm() since we don't want to return NULL to the caller of
this simple API


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758406 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 18:57:09 +00:00
William A. Rowe Jr
0d19ef47cd refactor mpm_common.c into itself and mpm_unix.c for unix-specific quirks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758367 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 17:52:23 +00:00
Jeff Trawick
5872c0a54c resurrect the old (pre-r757867) compiled-in MPM_NAME value, but via a hook for dynamically
linked MPMs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758312 13f79535-47bb-0310-9956-ffa450edef68
2009-03-25 15:46:56 +00:00
Jeff Trawick
e0eb7d1eef 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@757853 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 15:43:59 +00:00
Joe Orton
d5ea11eded * server/mpm_common.c (dummy_connection): If possible, use a non-SSL
listening port to use for the dummy connection, to avoid causing
  (confusing) error log spam by sending EOF down an SSL port.

PR: 39653


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726065 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 16:08:16 +00:00
Paul Querna
a73acf02f6 API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
Nick Kew
72119d92f5 Switch all unix MPMs to use drop_privileges hook (mod_unixd) for startup
and add a flag to prevent running without any module taking responsibility
for managing system privileges!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709993 13f79535-47bb-0310-9956-ffa450edef68
2008-11-03 00:46:54 +00:00
Paul Querna
1457f7207a Add dummy ap_mpm_register_timed_callback for other MPMs besides Event.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697425 13f79535-47bb-0310-9956-ffa450edef68
2008-09-20 22:04:03 +00:00
Martin Kraemer
a210a65426 Avoid core dumps by getting the signal_description only if
a process actually terminated on a signal. Update status
only on a valid wait response.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@617373 13f79535-47bb-0310-9956-ffa450edef68
2008-02-01 08:50:09 +00:00
Joe Orton
f73076edd1 * server/mpm_common.c (reclaim_one_pid): Retrieve the exit status from
apr_proc_wait(); call ap_process_child_status() for children which
  terminate, to ensure that abnormal exits (e.g. SIGSEGV) are logged.

PR: 42757


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@613263 13f79535-47bb-0310-9956-ffa450edef68
2008-01-18 20:49:46 +00:00
William A. Rowe Jr
1e84b4e15a Unless I've misread this, POD is write-blocking, read nonblocking timeout 0.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587673 13f79535-47bb-0310-9956-ffa450edef68
2007-10-23 22:05:14 +00:00
William A. Rowe Jr
8d7fe950f2 ap_available_mutexes_string and ap_add_available_mutexes_string
cannot be data symbols when mod_ssl is built as a loadable module;
using an external string constant in a loadable module is not portable.

Also reorganize file and sem to follow their explicit mechanisms,
and ensured that the explicit mechansims are listed in order of 
preference.  

This raises a question, would [fcntl|file] be a clearer way of 
indiciating what the file/sem methods devolve to?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@568833 13f79535-47bb-0310-9956-ffa450edef68
2007-08-23 05:55:11 +00:00
Jim Jagielski
269a403081 getpgid() returns a pid_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551889 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 13:28:58 +00:00
Joe Orton
0a0d324e07 Add alternative fixes for CVE-2007-3304:
* configure.in: Check for getpgid.

* include/mpm_common.h (ap_mpm_safe_kill): New prototype.

* server/mpm_common.c (reclaim_one_pid): Ensure pid validity before
calling apr_proc_wait().
(ap_mpm_safe_kill): New function.

* server/mpm/prefork/prefork.c, server/mpm/worker/worker.c,
server/mpm/experimental/event/event.c: Use ap_mpm_safe_kill() on pids
from the scoreboard, throughout.

* include/ap_mmn.h: Minor bump.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551843 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 10:33:14 +00:00
Joe Orton
ada9c28dcf Revert r547987 ("svn merge -c -547987 .")
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551835 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 09:31:11 +00:00
Joe Orton
f4fee126cc * server/mpm/prefork/prefork.c (reap_children),
* server/mpm_common.c (ap_wait_or_timeout): Remove dead code; NEED_WAITPID
has never been defined by the 2.x build system.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551823 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 08:43:29 +00:00
Jim Jagielski
86f602beb2 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@547987 13f79535-47bb-0310-9956-ffa450edef68
2007-06-16 21:29:24 +00:00
Joe Orton
2af272c512 * server/mpm_common.c (dummy_connection): Use "OPTIONS *" for request
on dummy connection.

PR: 41796


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@517233 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 14:49:07 +00:00
Ruediger Pluem
6460ed2a77 * Nitpicking: Get the comment right.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@500897 13f79535-47bb-0310-9956-ffa450edef68
2007-01-28 21:51:43 +00:00
Jeff Trawick
97b575accb Unix MPMs: Catch SIGFPE so that exception hooks and CoreDumpDirectory
can work after that terminating signal.

Submitted by: Eric Covener <covener gmail.com>
Reviewed by:  trawick



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@500881 13f79535-47bb-0310-9956-ffa450edef68
2007-01-28 21:14:40 +00:00
Jim Jagielski
707d1dabb9 Once SSLMutex allowed for the setting of both the
locking method and the lockfile location, I never
liked how AcceptMutex was linked to LockFile. This
seemed unnecessary. Much better to have AcceptMutex
do both as well. Plus, now that we will likely see
other modules require a "standard" way of setting
mutexes, why not have Apache provide that as
an API of sorts.

Anyway, LockFile is now depreciated and AcceptMutex
is now SSLMutex-like. We also provide a short
function that "parses" out a mutex parameter
and strips out the mechanism and lockfile location.
AcceptMutex and SSLMutex is this capability.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467326 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 13:17:29 +00:00
Jeff Trawick
743a621e8d 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().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 13:08:15 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Colm MacCarthaigh
a500939eb8 Add ap_relieve_child_processess(), a non-infanticidal copy of
ap_reclaim_child_processes(). Allows us to waitpid() each process in the
scoreboard and each "extra" process with a single call.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240465 13f79535-47bb-0310-9956-ffa450edef68
2005-08-27 22:12:08 +00:00
Colm MacCarthaigh
d7c04b158c Move the "GracefulShutdownTimeout" directive into mpm_common, for re-use
with other MPM's.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240296 13f79535-47bb-0310-9956-ffa450edef68
2005-08-26 17:43:24 +00:00
Colm MacCarthaigh
432af0071e Make the neccessary changes to mpm_common and main to support a graceful-stop
command line argument. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240269 13f79535-47bb-0310-9956-ffa450edef68
2005-08-26 16:00:59 +00:00
Colm MacCarthaigh
395896ae8d Remove support for the threaded-mpm's on Linux 2.0, and de-autoconf the
graceful restart signal. Frees up SIGWINCH for implementing graceful stop.
See <20050727114058.GA3390@stdlib.net> and subsequent thread on httpd-dev.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239430 13f79535-47bb-0310-9956-ffa450edef68
2005-08-23 16:41:17 +00:00
Paul Querna
cc2db72ca1 Add a User-Agent to the dummy connection code to ease admin debugging.
Submitted By: Colm MacCarthaigh <colm stdlib.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@230808 13f79535-47bb-0310-9956-ffa450edef68
2005-08-08 14:37:14 +00:00
Joe Orton
11865f1c06 * server/mpm_common.c (dummy_connection): Fix length argument passed
to apr_socket_send.  Remove redundant _shutdown call.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@202508 13f79535-47bb-0310-9956-ffa450edef68
2005-06-30 09:10:25 +00:00
Paul Querna
288bb4c9f7 Argh. Style Fix. Habits are hard to kill.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@202039 13f79535-47bb-0310-9956-ffa450edef68
2005-06-27 19:30:23 +00:00