1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

2981 Commits

Author SHA1 Message Date
Jim Jagielski
8f5558a1f1 Use apr func
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@544147 13f79535-47bb-0310-9956-ffa450edef68
2007-06-04 13:07:48 +00:00
Ruediger Pluem
7aa6c2295a * It does not matter if this pid is still in the scoreboard or not. We need to
remove it from our pid table in any case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543785 13f79535-47bb-0310-9956-ffa450edef68
2007-06-02 21:13:27 +00:00
Jim Jagielski
6f342d9c0b The unregister part should also remove from pid table.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543735 13f79535-47bb-0310-9956-ffa450edef68
2007-06-02 13:22:44 +00:00
Jim Jagielski
f89d7c2e02 not yet
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543734 13f79535-47bb-0310-9956-ffa450edef68
2007-06-02 13:03:44 +00:00
Jim Jagielski
21fc8bc1c2 Minor nit... be consistent and unset even now :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543667 13f79535-47bb-0310-9956-ffa450edef68
2007-06-01 23:44:36 +00:00
Ruediger Pluem
a311837d96 * Use local pid table also for OS/2 MPM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543654 13f79535-47bb-0310-9956-ffa450edef68
2007-06-01 23:04:43 +00:00
Jim Jagielski
7f7a0bbaec pid is proc here :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543587 13f79535-47bb-0310-9956-ffa450edef68
2007-06-01 19:46:08 +00:00
Jim Jagielski
a2d88accbc Create work-in-progress branch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543583 13f79535-47bb-0310-9956-ffa450edef68
2007-06-01 19:28:31 +00:00
Ruediger Pluem
bd03736495 * Also add a possible ETag header to r->headers_out. We need to have it there
for our later call to ap_meets_conditions a few lines above. Having it put
  in the merge table will fail as merge and r->err_headers_out get merged
  AFTER our call to ap_meets_conditions. Besides of this having multiple
  ETag headers (or a merged version of them) does not seem to make sense.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@541974 13f79535-47bb-0310-9956-ffa450edef68
2007-05-27 11:26:04 +00:00
Bradley Nicholes
2874d54f16 re-introduce ap_satisfies API back into core and modify how the access_checker, check_user_id and auth_checker hooks are called so that they respect the precedence that is set through the satisfy ALL/ANY directive. This also restores the directives order, allow, deny, satisfyas supported directives rather than being deprecated. These directives still remain in mod_access_compat however.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@534533 13f79535-47bb-0310-9956-ffa450edef68
2007-05-02 16:31:39 +00:00
Sander Temme
8aaea15506 Detab
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@522084 13f79535-47bb-0310-9956-ffa450edef68
2007-03-24 18:22:35 +00:00
Nick Kew
8da719ecea PR#41829 - Torsten Förtsch
Fix uninitialised var in server/request.c


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@522011 13f79535-47bb-0310-9956-ffa450edef68
2007-03-24 12:58:40 +00:00
Joe Orton
5448a22c70 * server/core_filters.c (ap_core_output_filter): Fail quickly with
APR_ECONNABORTED if the c->aborted flag is already set.

PR: 39605


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@521681 13f79535-47bb-0310-9956-ffa450edef68
2007-03-23 11:46:10 +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
Jeff Trawick
3ea66176ed fix spelling error in a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@505027 13f79535-47bb-0310-9956-ffa450edef68
2007-02-08 20:33:06 +00:00
Joe Orton
6e9dfd0b38 * server/listen.c (ap_apply_accept_filter): Bump TCP_DEFER_ACCEPT
argument to 30 units-of-unspecified-nature.

Submitted by: Dean Gaudet <dean arctic.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@501364 13f79535-47bb-0310-9956-ffa450edef68
2007-01-30 10:12:45 +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
William A. Rowe Jr
1fc3b01590 Embed the .manifest files of all httpd binaries as a post-build
operation.  This ensures the exported (Studio 97 generated) .mak
files create a usable Apache directly from the VC 8 (Studio 2005)
command line environment.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@495126 13f79535-47bb-0310-9956-ffa450edef68
2007-01-11 05:37:20 +00:00
William A. Rowe Jr
0becd1ee4e A slightly more effective message, keep hammering AcceptEx so there is no confusion.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@494321 13f79535-47bb-0310-9956-ffa450edef68
2007-01-09 05:29:58 +00:00
William A. Rowe Jr
3e2697ee98 Someone clearly never read the style guide :-/ Reformatting only.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@494320 13f79535-47bb-0310-9956-ffa450edef68
2007-01-09 05:29:27 +00:00
Chris Darroch
2ae14a64d2 Create pmain pool and run modules' child_init hooks when entering
ap_mpm_run(), then destroy pmain when exiting ap_mpm_run().
The expected call to ap_run_child_init() appears to have been removed
in r89640.  However, that call should presumably still be made once per
process, as in other single-process MPMs like the netware MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@491922 13f79535-47bb-0310-9956-ffa450edef68
2007-01-02 20:13:57 +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
Ruediger Pluem
36ca0ac794 * If APR_FINFO_NAME is added to the list of wanted information, apr_stat
always returns APR_INCOMPLETE on Unix platforms in the case that the
  call to the native stat / lstat did not fail. So we can safely assume
  that the stat / lstat call has been successful in this case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@491297 13f79535-47bb-0310-9956-ffa450edef68
2006-12-30 20:07:14 +00:00
Paul Querna
4794b34ea9 Improve the error message, include the full path of the file we are actually trying to call stat on.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@490920 13f79535-47bb-0310-9956-ffa450edef68
2006-12-29 05:27:49 +00:00
Jeff Trawick
f81c6a1b44 remove a bit of useless code from worker and event MPMs
PR: 41193
Submitted by: Davi Arnaut <davi haxent.com.br>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@490030 13f79535-47bb-0310-9956-ffa450edef68
2006-12-24 14:52:06 +00:00
Nick Kew
5861f12a4c PR#37680: fix socket block/nonblock on restart/graceful
Patch submitted by Darius Davis (darius-abz free-range.com.au)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@487901 13f79535-47bb-0310-9956-ffa450edef68
2006-12-16 21:41:38 +00:00
Ruediger Pluem
bdb52abd19 * Remove an unused variable and thus fix a compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@483629 13f79535-47bb-0310-9956-ffa450edef68
2006-12-07 19:45:51 +00:00
William A. Rowe Jr
00433ed6c7 Similar change to r483553 to help developers work in parallel on win32, install
default command-line build to \Apache2x directory, and name service Apache2.x
(which means this doesn't need to change over and over as trunk becomes 2.5, 2.7 etc.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@483555 13f79535-47bb-0310-9956-ffa450edef68
2006-12-07 17:11:51 +00:00
Joe Orton
bcc098b341 * docs/manual/mod/mpm_common.xml: s/depreciated/deprecated/
* server/core.c: Likewise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@478131 13f79535-47bb-0310-9956-ffa450edef68
2006-11-22 11:36:32 +00:00
Graham Leggett
913e2f791e Fix a typo.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467442 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 19:06:10 +00:00
Joe Orton
acd492152e * server/log.c (ap_open_logs): When dup2'ing the error log to stderr,
use the already-open stderr file object rather than opening a new one.

Submitted by: Tom Donovan <Tom.Donovan acm.org>
PR: 40476


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467338 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 14:16:01 +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
e3f4ffeaaf Fix address-in-use startup failure caused by corruption of the list of
listen sockets in some configurations with multiple generic Listen
directives.

The logic in error is that which prunes out generic IPv4 listening
sockets when we already have a v4-mapped generic IPv6 listening 
socket for the same port.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467034 13f79535-47bb-0310-9956-ffa450edef68
2006-10-23 17:18:35 +00:00
Chris Darroch
9c4d3003b7 added APR_THREAD_FUNC on listener_thread() in event and worker MPMs
to match definition of apr_thread_start_t


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@465333 13f79535-47bb-0310-9956-ffa450edef68
2006-10-18 18:49:13 +00:00
Chris Darroch
272f25f21f rename routines from worker MPM to match normal MPM naming
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@464973 13f79535-47bb-0310-9956-ffa450edef68
2006-10-17 17:39:52 +00:00
Graham Leggett
ec119dcfe4 sendfile_nonblocking() takes the _brigade_ as an argument, gets
the first bucket from the brigade, finds it not to be a FILE
bucket and barfs. The fix is to pass a bucket rather than a brigade.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@462580 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 21:31:36 +00:00
Joe Orton
d91484f6fc When starting a new piped error logger for the main server, ensure
that the new child's stderr is not a pipe to an old piped logger:

* server/log.c (log_child): Add "dummy_stderr" parameter; if set,
duplicate stdout as the stderr for the child.
(open_error_log): Add "is_main" parameter; use dummy stderr for logger
for main server only.
(ap_open_logs, ap_open_piped_log): Adjust for new open_error_log()/
log_child() parameters.

PR: 40651
Submitted by: jorton, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@452431 13f79535-47bb-0310-9956-ffa450edef68
2006-10-03 11:40:30 +00:00
Joe Orton
d6c234ac4a * server/mpm/prefork/prefork.c (prefork_check_config): Remove unused variable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451297 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 14:03:13 +00:00
Ruediger Pluem
81961d30fc * Move the tasks of eor_bucket_destroy (status update, transaction logging) to
a cleanup function that is registered with the request pool.
  eor_bucket_destroy only destroys the request pool if there is still a request
  at this point of time which triggers the call of the cleanup function.

  This is needed as the eor bucket could be (and usually is) allocated from
  a pool different from the request pool (the connection pool in this case).
  This can lead to situations where eor_bucket_destroy is called at a point of
  time when the request pool had been already destroyed. But the status update
  and the transaction logging rely on the request pool.

  In practise this happens with the worker MPM if the client refuses to read
  the response from the handler. Then the unsent data (including the
  eor bucket) remains in a brigade allocated from the connection pool which
  is the parent of the request pool. This brigade is cleaned up during the
  cleanup of the ptrans pool in worker_thread. As the request pool gets
  destroyed during this cleanup operation *before* the brigade gets cleaned up
  eor_bucket_destroy starts the status update and the transaction logging with
  a destroyed request pool which leads to a segfault.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451279 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 13:15:08 +00:00
Nick Kew
51102dd25a Generic fix for PR#31759
If a handler returns a value that is neither reserved nor a valid
HTTP response code, log an error and substitute HTTP_INTERNAL_SERVER_ERROR.
Allow a handler to override this explicitly by setting a note.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@448711 13f79535-47bb-0310-9956-ffa450edef68
2006-09-21 22:13: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
André Malo
cab0f8754c fix eol-style
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@432686 13f79535-47bb-0310-9956-ffa450edef68
2006-08-18 19:16:54 +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
Mladen Turk
36db918bc8 Fix return values from wait_for_many_objects.
The return value is index to the signaled thread in
the creted_threads array.
We can not use WAIT_TIMEOUT as return value
because its value is defined as 258, thus limiting
the MaxThreads to that value that leads to the
assertion errors.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428029 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 15:31:24 +00:00
Mladen Turk
a409ec8829 Revert the patch. Although the problem still exists
its root cause is inside the wait_for_many_objects.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428009 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 14:41:31 +00:00
Mladen Turk
da44990a05 Fix the assertion if the WaitForMutipleObjects
returns WAIT_ABANDONED_NN instead presumed
WAIT_OBJECT_NN. This will correctly close the thread
handle without using invalid thread handle array index.

Spotted when large balancer timeout was set
and all the threads were busy waiting for the
connection:
[Wed Aug 02 14:29:58 2006] [crit] [Wed Aug 02 14:29:58 2006] file \\build-2.2.2\\server\\mpm\\winnt\\child.c, line 1120, assertion "(rv >= 0) && (rv < threads_created)" failed


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@428008 13f79535-47bb-0310-9956-ffa450edef68
2006-08-02 14:36:24 +00:00
Roy T. Fielding
399bc245dd Fix warning on Darwin 8.7.0 (OS X 10.4.7) due to the prototype for
sendfile_nonblocking being declared outside ifdefs even though the
function is defined and used only when APR_HAS_SENDFILE



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425571 13f79535-47bb-0310-9956-ffa450edef68
2006-07-26 00:40:53 +00:00
Ruediger Pluem
0255874634 * Although the lstat call should rarely ever fail, because we stat'ed the
same file several lines above, check the return value to be save that
  nothing bad happens in the case it does fail.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425394 13f79535-47bb-0310-9956-ffa450edef68
2006-07-25 13:40:32 +00:00
Ruediger Pluem
f1c497a222 * Fix typo. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425057 13f79535-47bb-0310-9956-ffa450edef68
2006-07-24 14:09:27 +00:00