1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

1323 Commits

Author SHA1 Message Date
Ryan Bloom
fcaa0f5620 Improve the exports generating awk script. In the past, we had
work around problems in the awk script by avoiding some #if and
#ifdefs.  This has bitten us many times in generating the exports.c
file.  This improvement allows corrects the header file parsing.

Submitted by:	Sander Striker <striker@apache.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89647 13f79535-47bb-0310-9956-ffa450edef68
2001-07-21 06:34:54 +00:00
William A. Rowe Jr
05fcc41a1f Update for latest structure changes for 2.0.21
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89644 13f79535-47bb-0310-9956-ffa450edef68
2001-07-20 20:00:50 +00:00
David Reid
a00679f49f Get ONE_PROCESS working again for beos.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89640 13f79535-47bb-0310-9956-ffa450edef68
2001-07-20 10:09:43 +00:00
David Reid
d7a428b08a Some small changes...
- use palloc instead of pcalloc
- add code to set larger FD_SETSIZE if appropriate
- some formatting tidy up


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89616 13f79535-47bb-0310-9956-ffa450edef68
2001-07-19 12:49:32 +00:00
Greg Ames
590a1bde98 fix memory leak of apr_sockaddr_t and apr_socket_t in ap_mpm_pod_signal,
called by perform_idle_server_maintenance.

allocate & init one apr_sockaddr_t for the dummy connect at pod open time.
use a temporary subpool for the apr_socket_t


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89612 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 21:16:40 +00:00
William A. Rowe Jr
7f30a1383e Fix ap_create_scoreboard fooness on Win32.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89609 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 21:13:04 +00:00
Ryan Bloom
3d8f3ce64b Make scoreboard creation a hook. This allows management
modules to have access to the scoreboard at the time that it is
created, and at every restart request.
Submitted by:	Cody Sherr <csherr@covalent.net>
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89608 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 20:45:36 +00:00
Paul J. Reder
620a48e609 Changed AP_MPMQ_MAX_DAEMONS to refer to MaxClients and
added an AP_MPMQ_MAX_DAEMON_USED to refer to the highest
daemon index actually used in the scoreboard. I also
updated the pertinent calls.

Paul J. Reder


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89604 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 20:29:00 +00:00
William A. Rowe Jr
ce3b970d96 Missed one, all should have recovered from APR_INHERIT now.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89602 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 19:58:49 +00:00
William A. Rowe Jr
6f96a10305 Omitted the arg
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89594 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 17:14:09 +00:00
William A. Rowe Jr
61e59ac063 rbb's names still need work :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89593 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 17:13:01 +00:00
William A. Rowe Jr
b65ca11a4a Changes to back out inherit flag from apr_os_sock_make()
and apr_socket_create()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89592 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 16:56:55 +00:00
William A. Rowe Jr
1fa29a8d2d Obvious files that need inheritance, correct me if I'm wrong.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89561 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 21:07:40 +00:00
William A. Rowe Jr
e67ca3bc76 Fix for the new schema
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89560 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 18:14:51 +00:00
Ryan Bloom
44715abbd2 Added an inherit flag to apr_socket_create and other socket creation
functions.  This allows APR programs to specify that a socket should
be passed to any child processes that are created.  The inherit flag
is only meaningful if programs use apr_process_create().  This
also adds a couple of macros that allow APR types to set and unset
the inherit flag.

This also fixes Apache to use the new API.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89557 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 16:11:05 +00:00
Ryan Bloom
6a04393470 Remove a couple fields from the scoreboard that aren't currently used.
If we need these, they should be added when we begin to use them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89554 13f79535-47bb-0310-9956-ffa450edef68
2001-07-16 02:29:33 +00:00
Bill Stoddard
1ad8da5465 Win32: Prevent listening sockets from being inherited by
the Apache child process, CGI scripts, rotatelog process
etc.  If the Apache child process segfaults, any processes
that the child started are not reaped. Prior to this fix,
these processes inherited the listening sockets which sometimes
prevented the restarted Apache child process from accepting
connections (ie, the server would hang).

The Sleep(1000) is a bit of a hack but it is sufficient I believe. All
that is really necessary is for the parent to give up its quantum and
allow the child to run. I could not get WaitForInputIdle to work properly.
Will investigate alternative solutions later.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89547 13f79535-47bb-0310-9956-ffa450edef68
2001-07-13 18:46:15 +00:00
Bill Stoddard
5187b44953 Win32: First of two patches to prevent child processes from inheriting open
socket descriptors.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89546 13f79535-47bb-0310-9956-ffa450edef68
2001-07-13 12:45:19 +00:00
Greg Ames
5139e492bd scratch an old itch - give lingering close its own state in the scoreboard.
clean up SERVER_ACCEPTING and SERVER_QUEUEING (never set) while I'm at it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89542 13f79535-47bb-0310-9956-ffa450edef68
2001-07-12 03:20:50 +00:00
Jeff Trawick
5ec8cc24e3 Fix an issue with the pod and prefork:
when the parent process wakes up a server process via connect(), use
an APR timeout on the connect() so that we don't hang for a long time
if there aren't server processes around to do accept()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89539 13f79535-47bb-0310-9956-ffa450edef68
2001-07-11 14:48:23 +00:00
Ryan Bloom
2843b8672e Add two functions to allow modules to access random parts of the
scoreboard.  This allows modules compiled for one MPM to access the
scoreboard, even if it the server was compiled for another MPM.

Submitted by:	Harrie Hazewinkel <harrie@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89532 13f79535-47bb-0310-9956-ffa450edef68
2001-07-10 19:00:03 +00:00
Jeff Trawick
81d792e5e2 Check the pod after processing a connection so that we'll go away
if a graceful restart occurred while we were processing the
connection.  Otherwise, we won't wake up until a real connection
comes in and we'll use the wrong config to process it and we may
block in the wrong syscall (because the new generation is using a
different accept mutex) and in general it is goofy.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89531 13f79535-47bb-0310-9956-ffa450edef68
2001-07-10 18:56:55 +00:00
Jeff Trawick
83f3e9b080 uri_delims.h moved
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89528 13f79535-47bb-0310-9956-ffa450edef68
2001-07-10 04:51:56 +00:00
Bill Stoddard
1cd0d5dbae Recover from some APR cont --> pool conversions by D. Reid.
Submitted by: Mladen Turk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89522 13f79535-47bb-0310-9956-ffa450edef68
2001-07-09 14:44:32 +00:00
Ryan Bloom
8441f05fd9 Allow all parts of Apache 2.0 to build when --srcdir is used. This
required exposing a build directory and a source directory to all parts
of Apache's build system.  It also required a small hack in APR-util, if
we are using the bundled Expat, and we are using VPATH support, then we
have hard-coded the xml/expat location.  I couldn't figure out how to
allow the configure script to determine the correct location.  I added a
comment, but if somebody else figures it out, we should fix that at some
point.

PR:	7630


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89517 13f79535-47bb-0310-9956-ffa450edef68
2001-07-09 02:31:09 +00:00
Bill Stoddard
48e11e3998 Grrr.. Cliff warned me about this. APR should return APR_SUCCESS with
zero bytes read rather than APR_EOF. Will work on APR later...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89508 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 19:49:47 +00:00
Bill Stoddard
aedbb34ee7 Add error message and return if we fail reading from a bucket in the
core_outout_filter(). core_output_filter() is in need of a rewrite, it is
getting quite crufty.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89507 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 18:41:56 +00:00
Bill Stoddard
3ab4db196a emulate_sendfile() is a better name for what this function does. No function
change is made by this patch, only a static function name change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89506 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 18:07:24 +00:00
Bill Stoddard
a4273dbb11 Reimplement content length filter to fix problem where all output from
CGI scripts was being buffered in the brigade before any of it was
written to the network. cl filter now honors flush and implements a
buffer threshold.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89503 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 00:28:41 +00:00
Bill Stoddard
6e2195d7df Do non-blocking reads from pipes in the content-length filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89501 13f79535-47bb-0310-9956-ffa450edef68
2001-07-05 14:58:03 +00:00
David Reid
da7f803429 Having gone through and expnaded out the hook macro it seemed a waste
to throw it away, so here it is added as comments for people who are
in the same place I was trying to debug what was going on inside a hook.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89496 13f79535-47bb-0310-9956-ffa450edef68
2001-07-04 03:16:33 +00:00
Ryan Bloom
8be07b8232 Fix the forking/killing logic in the threaded MPM. The problem we were
seeing with the server eating itself wasn't because we were comparing
the idle_thread_count and min/max spare servers wrong.  It was because
we were counting idle_thread_count incorrectly.  This fixes that problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89495 13f79535-47bb-0310-9956-ffa450edef68
2001-07-03 13:58:10 +00:00
Ryan Bloom
a9427bdbf4 This fixes the problem of the server not starting new processes to keep
up with a heavy load.  The server still doesn't kill processes correctly,
so we need to fix that, but we are closer now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89494 13f79535-47bb-0310-9956-ffa450edef68
2001-07-03 05:16:33 +00:00
Ryan Bloom
992ac468fa Fix the threaded MPM perform_idle_server_maintenance. Basically, we now
count how many threads are actually idle, regardless of which process they
are in.  This patch makes us use (min_spare_threads|max_spare_threads)
* number_of_running_servers to determine if we should kill of processes or
start new ones.  This MPM no longer thrashes killing child processes as
soon as they are created, and the server continues to serve requests even
if the server is gracefully restarted and each child has one active thread.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89488 13f79535-47bb-0310-9956-ffa450edef68
2001-07-01 22:49:31 +00:00
Jeff Trawick
ca71343263 fix some warnings (mostly unused variables)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89482 13f79535-47bb-0310-9956-ffa450edef68
2001-06-28 22:15:53 +00:00
Ryan Bloom
a1a1d20b76 Fix the big issue with the threaded MPM. We no longer stop dead if all
processes are busy serving one long-lived request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89466 13f79535-47bb-0310-9956-ffa450edef68
2001-06-28 05:00:59 +00:00
William A. Rowe Jr
f6f3f613e3 Refresh .mak files for tagging 2.0.19
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89458 13f79535-47bb-0310-9956-ffa450edef68
2001-06-28 00:31:04 +00:00
William A. Rowe Jr
e9710c17ca Testing reveals a nasty side effect of this aftn's patch, this is the fix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89450 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 23:18:30 +00:00
William A. Rowe Jr
d4c82f83ea Pull harry, difficult to read sub_req_common_validation() into its own
function so that it's apparent that this is common code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89447 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 21:48:53 +00:00
William A. Rowe Jr
a7a28bd8c0 Here, finally are a few cleanups of my fat fingers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89444 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:57:14 +00:00
William A. Rowe Jr
07f1f1f5ea Now, introduce ap_sub_req_lookup_dirent() for processing apr_finfo_t
results from mod_negotiation and mod_autoindex.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89443 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:53:36 +00:00
William A. Rowe Jr
449207bd36 Pull the common cruft from ap_sub_req_lookup_*() fns.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89442 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:46:52 +00:00
William A. Rowe Jr
e3a7a230e7 Sorry, second pass, working on legibility. This patch introduces the
fill_in_sub_req_vars function to propogate the rnew values, but doesn't
  yet hook it in.  Note that there are two discrepancies, apparently
  pretty bad ones, that have been moved after the 'common code' so the
  next patch becomes pretty simple.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89441 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:44:00 +00:00
William A. Rowe Jr
ec222e4248 Revert changes in 1.7, I had applied the patch incorrectly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89439 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:30:49 +00:00
Cliff Woolley
29212e8c6b *) Account for the new pool parameter to apr_bucket_file_create()
and apr_bucket_file_make().

*) Simplify mod_file_cache's sendfile_handler by taking advantage
   the new ability of file buckets to handle files opened in XTHREAD
   mode.  [Also inlined some of the brigade construction stuff in
   mod_file_cache's handlers to save a palloc() or two.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89438 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:18:09 +00:00
William A. Rowe Jr
8ba66cccaf Move duplicated rnew cloning from apr_ap_sub_req_lookup_*() functions,
and add an ap_sub_req_lookup_dirent() to create a subrequest from the
  results of an apr_dir_read() for mod_negotiation and mod_autoindex.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89437 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:09:24 +00:00
William A. Rowe Jr
7a5c5c4965 Add additional query datum to the MPMs.
Harrie Hazewinkel <harrie@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89433 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 17:43:51 +00:00
Jeff Trawick
bc3508337c hide the generation of the httpd.exp header from the build messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89431 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 17:11:52 +00:00
Jeff Trawick
6ee771ecbd get strcasecmp() prototype available on AIX
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89429 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 10:15:37 +00:00
Jeff Trawick
e943e56bcc add the AcceptMutex directive to the perchild MPM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89423 13f79535-47bb-0310-9956-ffa450edef68
2001-06-26 17:44:49 +00:00