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

120 Commits

Author SHA1 Message Date
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
6d8de2ff42 Rename MaxClients to MaxRequestWorkers which describes more accurately what
it does.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137744 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:00:52 +00:00
Jeff Trawick
f60e484691 fill in conn_rec::current_thread for WinNT, NetWare, and OS/2 MPMs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103595 13f79535-47bb-0310-9956-ffa450edef68
2011-05-16 02:19:42 +00:00
Jeff Trawick
462c69e0b5 Add child_status hook for tracking creation/termination of MPM child
processes.  Add end_generation hook for notification when the last
MPM child of a generation exits.

end_generation is implemented completely by core using the
child_status hook run by the MPM.

simple and mpmt_os2 MPMs don't currently run the child_status
hook, so neither hook is invoked with those MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096609 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 21:21:22 +00:00
Jeff Trawick
573a235d3b the mpm-note-child-killed hook is just for state sync between
ap_{reclaim,relieve}_child_processes() and their callers

the NetWare and OS/2 MPMs don't use that


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086948 13f79535-47bb-0310-9956-ffa450edef68
2011-03-30 13:32:21 +00:00
Jeff Trawick
5e3ba7d3ee mpm_common.c implements a handful of config directives; the
related state has to be re-initialized to the default values
at pre-config time, but that was handled inconsistently by
the MPMs, resulting in unexpected behavior when some of the
directives were removed across restart

move that necessary initialization from the MPMs to common 
code run from core's pre-config; MPMs that need to override
defaults can do so by running after core's pre-config (the 
NetWare MPM now does that)

the DEFAULT_MAX_REQUESTS_PER_CHILD compile setting wasn't useful
enough to keep

the simple MPM wasn't consistent in which of these directives
were respected and which weren't, and that hasn't changed
(see procmgr.max_requests_per_child vs. ap_max_requests_per_child)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086293 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 16:25:20 +00:00
Guenter Knauf
7a46368910 Removed duplicate global; removed obsolete cast.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1004311 13f79535-47bb-0310-9956-ffa450edef68
2010-10-04 16:29:43 +00:00
Guenter Knauf
973eb55182 Added require prototypes conditionally to CFLAGS for NETWare;
added header includes for getting protos.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@991588 13f79535-47bb-0310-9956-ffa450edef68
2010-09-01 16:17:23 +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
02dc2d45cf Code cleanup: replace strncpy by apr_cpystrn or apr_pstrmemdup
Submitted by: Takashi Sato <takashi lans tv com>
PR: 43432


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@981086 13f79535-47bb-0310-9956-ffa450edef68
2010-07-31 20:08:44 +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
Daniel Earl Poirier
0c96068dc4 Log command line on startup, so there's a record of command line
arguments like -f.  Suggested by Shaya Potter.  [Dan Poirier]
PR: 48752


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@910684 13f79535-47bb-0310-9956-ffa450edef68
2010-02-16 20:50:10 +00:00
Jeff Trawick
01026cbc46 remove dead code related to the accept mutex
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882943 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 17:18:39 +00:00
Jeff Trawick
2b3afcf718 follow up r791309 with additional changes to accommodate the new MPM interfaces
(some old API variables are now private, support retrieval of the MPM generation, 
implement the mpm_note_child_killed hook)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831951 13f79535-47bb-0310-9956-ffa450edef68
2009-11-02 16:32:05 +00:00
Guenter Knauf
0dce4533be first hacks to make mpm_netware usable again; not ready yet!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@791309 13f79535-47bb-0310-9956-ffa450edef68
2009-07-05 20:25:47 +00:00
Jeff Trawick
0d2cef82b3 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760403 13f79535-47bb-0310-9956-ffa450edef68
2009-03-31 11:34:49 +00:00
Jeff Trawick
b84e4404d2 axe the unnecessary AP_MPM_HARD_LIMITS_FILE
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758671 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 15:03:57 +00:00
Paul Querna
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
Paul Querna
5fa2bbbdeb Remove ap_graceful_stop_signalled from all MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645437 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:00:32 +00:00
Chris Darroch
0d7e6b8243 Destroy pmain pool when exiting ap_mpm_run() so that cleanups
registered in modules' child_init hooks are performed (e.g.,
mod_log_config and mod_dbd).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@491907 13f79535-47bb-0310-9956-ffa450edef68
2007-01-02 19:40:34 +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
Chris Darroch
e69f467709 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.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@431460 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 22:55:45 +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
08c97ba290 No functional change: remove "internal" tab spacing/formatting.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345053 13f79535-47bb-0310-9956-ffa450edef68
2005-11-16 16:31:25 +00:00
Jim Jagielski
b72e610410 No functional change: more indenting/formatting changes due to
tabbing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332316 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 16:03:23 +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
Bradley Nicholes
6905d3d9d5 Allow httpd on NetWare to build using either the standard socket libraries or the Winsock libraries.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@161368 13f79535-47bb-0310-9956-ffa450edef68
2005-04-14 23:42:21 +00:00
Bradley Nicholes
bb35e2f831 Make sure that the secure listen sockets that are created and injected into the ap_listeners lists by mod_nw_ssl are handled correctly so that they remain open and reused across restarts.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156556 13f79535-47bb-0310-9956-ffa450edef68
2005-03-08 18:09:43 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Bradley Nicholes
8baaa0a27f Fixing various compiler error when compiling against the latest version of LibC SDK
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106766 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 22:50:18 +00:00
Bradley Nicholes
289b8bfad9 Fix a typo and clean up some tab characters.
Submitted by: Guenter Knauf <gk@gknw.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103388 13f79535-47bb-0310-9956-ffa450edef68
2004-04-14 16:58:34 +00:00
Jeff Trawick
4d8f4c26d6 *) SECURITY: CAN-2004-0174 (cve.mitre.org)
Fix starvation issue on listening sockets where a short-lived
     connection on a rarely-accessed listening socket will cause a
     child to hold the accept mutex and block out new connections until
     another connection arrives on that rarely-accessed listening socket.
     With Apache 2.x there is no performance concern about enabling the
     logic for platforms which don't need it, so it is enabled everywhere
     except for Win32.  [Jeff Trawick]

(already in 2.0.49, propagating to mirrors now)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103029 13f79535-47bb-0310-9956-ffa450edef68
2004-03-19 11:16:03 +00:00
Bradley Nicholes
6065b37bca Adapt the mpm_netware version of the ThreadStackSize directive to the common version
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103013 13f79535-47bb-0310-9956-ffa450edef68
2004-03-17 19:47:08 +00:00
Bradley Nicholes
2e0569de3d Report the NetWare socket error since we are using native socket calls
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102986 13f79535-47bb-0310-9956-ffa450edef68
2004-03-16 02:49:15 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
8f5cc7b5fc fix copyright dates according to the first checkin
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102584 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:43:45 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
Jean-Jacques Clar
437ecfc445 Commenting out the DBINFO define
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102487 13f79535-47bb-0310-9956-ffa450edef68
2004-02-02 22:37:52 +00:00
Jean-Jacques Clar
aa4c436cca Adding missing parenthesis in DBINFO code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102486 13f79535-47bb-0310-9956-ffa450edef68
2004-02-02 22:35:08 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Bradley Nicholes
977bc94d5b Added mpm_state to ap_mpm_query() for the NetWare MPM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102078 13f79535-47bb-0310-9956-ffa450edef68
2003-12-16 20:55:04 +00:00
Bradley Nicholes
8175888f1e Fix the display of the terminate and restarting console messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101988 13f79535-47bb-0310-9956-ffa450edef68
2003-12-04 21:26:50 +00:00
Bradley Nicholes
d1c97e790b Add restart and shutdown thread counters to the console display
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101902 13f79535-47bb-0310-9956-ffa450edef68
2003-11-26 18:48:56 +00:00
Cliff Woolley
ad4ef6a24c revert my previous commit. when 2.0 and 2.1 were not in sync, i went with
what was in 2.0 because it was more recent, but it turns out that was
the wrong choice.  reverts to 2.0 to follow


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101173 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 22:46:17 +00:00
Cliff Woolley
9042470cbe forward-port Brad's commit to the 2.0 branch that gets rid of the
explicit bucket_alloc_destroy(), which is redundant


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101164 13f79535-47bb-0310-9956-ffa450edef68
2003-09-05 19:08:56 +00:00
Jeff Trawick
aa21671e13 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


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
Cliff Woolley
a770ae9e77 Updated the various MPM's to use the new bucket_alloc_create_ex API
when necessary.  Which is to say that it's necessary in all cases except
for prefork, where the change to apr-util to have it use the allocator
from the pool passed in is already sufficient.

Reviewed by:	Jean-Jacques Clar, Sander Striker, Brad Nicholes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101122 13f79535-47bb-0310-9956-ffa450edef68
2003-08-28 05:54:44 +00:00
Bradley Nicholes
dc4cfa1640 Make sure that the global ap_max_mem_free is initialized along with the
other MPM globals whenever HTTPD is started or restarted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101117 13f79535-47bb-0310-9956-ffa450edef68
2003-08-27 22:33:12 +00:00