Commit Graph

124 Commits

Author SHA1 Message Date
603dec1da3 Add a temporary pool argument to unixd_pre_config, so that it can call
APR functions (grumble). This is needed for apr_stat, which will be in
the suexec path coming up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86710 13f79535-47bb-0310-9956-ffa450edef68
2000-10-23 10:54:18 +00:00
d85bbfb847 This begins to remove BUFF from the server. The idea is to go very slowly
with this.  To begin with, we store both the socket and the BUFF in the
conn_rec.  Functions are free to use which ever they want, in the end all
of the data goes to the same place.  This modifies all of the MPMs except
Windows.  All of the Unix MPMs are working, but the others need to be
tested.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86651 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 19:12:16 +00:00
d6490633eb Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 06:05:15 +00:00
01f4c4f960 The lots of little ones... APR_IS_STATUS_condition(rv) conditional macros
replacing the majority of fallible rv == APR_condition tests.  But there
  are lots more to fix, these are the obvious ones that already did proper
  canonical error conversion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86405 13f79535-47bb-0310-9956-ffa450edef68
2000-10-05 17:33:14 +00:00
ae7cca1bd9 Remove IOLs from Apache. They are no longer necessary, now that we have
filtering beginning to work.  There is a hack that has been repeated
through this patch, we morph a pipe into a socket, and put the socket
into the BUFF.  Everytime we do that, we are working with a pipe from
a CGI, and we should be creating a pipe bucket and passing that bucket
back.  Because we don't actually have pipe buckets yet, we are using this
hack.  When we get pipe buckets, this will be fixed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86136 13f79535-47bb-0310-9956-ffa450edef68
2000-08-23 00:01:58 +00:00
7ed141239d APRize disabling nagle (setting TCP_NODELAY).
Note that several areas have not been tested as they apply to MPMs or APR
code that I can't test.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86133 13f79535-47bb-0310-9956-ffa450edef68
2000-08-22 15:09:28 +00:00
1a9db204f5 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:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 06:07:53 +00:00
059d8dd212 prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85976 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 05:27:38 +00:00
69714973ef Add a NO_DETACH environment variable to all MPMs that understand
ONE_PROCESS.  This allows Apache to start up without detaching from
the controlling terminal, but also not going into single process mode.
The main purpose of this patch is to make it very easy to debug the
child process startup code.
PR:	2144


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85970 13f79535-47bb-0310-9956-ffa450edef68
2000-08-01 17:36:13 +00:00
e23401a35b Fix some problems with which error code to use after a pthread_ failure.
Most of the changes added support for PTHREAD_SETS_ERRNO; a few of the
changes fixed bugs in existing code which always used errno (which
doesn't get the right error code on most platforms).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85963 13f79535-47bb-0310-9956-ffa450edef68
2000-07-31 15:39:19 +00:00
b4c94279d7 Make the Unix MPMs not clean the scoreboard on a graceful restart. This
compiles, but it hasn't actually been tested yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85957 13f79535-47bb-0310-9956-ffa450edef68
2000-07-31 01:39:54 +00:00
c266de9029 Remove iol_socket.h. This file had one declaration, and it makes more
sense for that declaraion to move to ap_iol.h.  This also modifies all of
the files that include iol_socket.h to include ap_iol.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85934 13f79535-47bb-0310-9956-ffa450edef68
2000-07-29 16:24:15 +00:00
307207de74 Don't try to process a connection when accept() failed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85908 13f79535-47bb-0310-9956-ffa450edef68
2000-07-27 23:05:44 +00:00
902f8b36ee Fix typo in log message.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85884 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 17:39:20 +00:00
847b20108c Add APR_EOL_STR for a platform specific text delimiter, provided by
apr.h (defined in apr.h.in and apr.hw).  This is needed -only- in APR
  created files (true raw files) such as logs.  It is not required in any
  splat to screen (stderr/stdout) formatting, nor any html markup.

  Some other modules slipped through in the prior apr_strings.h commit.
  Sorry 'bout that.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85878 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 01:06:32 +00:00
22d9fbdec0 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85867 13f79535-47bb-0310-9956-ffa450edef68
2000-07-21 19:50:58 +00:00
db3c12a79e Fix some bad ap_log_error() invocations. Comment on a bad
ap_log_rerror() invocation.

Almost all of this is in code never compiled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85860 13f79535-47bb-0310-9956-ffa450edef68
2000-07-17 22:11:47 +00:00
c4aeab10dc #ifdef APR_HAS_OTHER_CHILD to #if APR_HAS_OTHER_CHILD. Not tested.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85821 13f79535-47bb-0310-9956-ffa450edef68
2000-07-11 22:12:18 +00:00
f23ce00e31 Move sock_disable_nagle to mpm_common.c. Rename it to ap_sock_disable_nagle.
Again, I tried to modify all MPMs that are currently using this code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85811 13f79535-47bb-0310-9956-ffa450edef68
2000-07-10 22:08:11 +00:00
c481bb225a Move setup_listeners to listen.c. This renames it to ap_setup_listeners,
and removes the duplicated code from all effected MPMs.  The only this
doesn't touch, is Windows.  That MPM was using a different setup_listeners.
If one of the Windows guys would like to modify the WinNT MPM to use the
same setup_lsiteners, that would be VERY cool.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85809 13f79535-47bb-0310-9956-ffa450edef68
2000-07-10 21:37:23 +00:00
074e3c2fb4 Move process_child_status to mpm_common.c. This requires re-naming it
to ap_process_child_status and opening up ap_coredump_dir.  I have
modified all of the MPMs that I saw using this function to work with this
patch.  Sorry if I broke anybody.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85808 13f79535-47bb-0310-9956-ffa450edef68
2000-07-10 18:21:24 +00:00
d92be21f38 Allocate iols out of the ptrans pool rather than mallocing them out
of the heap. The extra malloc/free is a significant performance
hit on some platforms and repeatedly alloc/freeing small chunks of storage
can fragment the heap.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85770 13f79535-47bb-0310-9956-ffa450edef68
2000-07-05 19:40:39 +00:00
0966bdbdfa Remove some warnings from the latest compile. I don't know why these
haven't turned up before.  We were using the wrong types in our printf
calls for times.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85767 13f79535-47bb-0310-9956-ffa450edef68
2000-07-05 18:01:52 +00:00
53346f129d Remove ap_get_server_conf() from the MPM's that implement. The only place
this function was ever called was inside the MPM's, and not all of the
MPM's actually had the function.  This is part of another round of common
code clean-up.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85736 13f79535-47bb-0310-9956-ffa450edef68
2000-06-30 21:18:26 +00:00
114fb2e4ac Combine some common code. Before this, all platforms implemented their
own iol_sockets using APR.  This just combines all of that code to a
common file and moves that file to main.  I have tested this with all of
the Unix MPM's, but I am willing to bet I missed something (Makefiles) for
Windows, and possibly moving some code for OS/2 and BeOS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85732 13f79535-47bb-0310-9956-ffa450edef68
2000-06-30 18:08:13 +00:00
60b349a911 Fix compile warning on AIX
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85710 13f79535-47bb-0310-9956-ffa450edef68
2000-06-27 22:35:40 +00:00
de7b83331a Log errors from ap_accept().
Fix bad ap_log_error() argument list.
Pass correct error code from ap_poll().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85683 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 14:33:48 +00:00
03730c671a Fix a couple of problems associated with recognizing when file
descriptors for connected sockets are too big.

Todo: The BeOS MPMs seem to have the same issue.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85679 13f79535-47bb-0310-9956-ffa450edef68
2000-06-23 20:23:08 +00:00
4a9cda07b6 Clean up the APR-ization of the pipe of death.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85678 13f79535-47bb-0310-9956-ffa450edef68
2000-06-23 20:02:58 +00:00
872f6dbf91 Fix the mpmt_pthread MPM to use an APR pipe for the pipe of death. This
allows us to use APR_SOCKETS_AS_FILES to poll on an APR socket.  Finally,
this makes the MPM more portable, because it is now always possible to set
the pipe to be non-blocking.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85676 13f79535-47bb-0310-9956-ffa450edef68
2000-06-23 18:12:44 +00:00
220a39fb11 Bring back the hokey call to ap_create_tcp_socket() so mpmt_pthread
works again.  It is completely hosed at the moment.

Todo: remove the need for this call.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85675 13f79535-47bb-0310-9956-ffa450edef68
2000-06-23 18:02:16 +00:00
5fc0d74557 Commit a few changes to the mpmt_pthread and dexter MPMs. These basically
fix the error checking for one return from ap_poll, and use ap_pcalloc to
allocate the listenfds array.  By using listenfds, we can avoid making
an unnecessary call to ap_create_tcp_socket.
Submitted by:	Jeff Trawick
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85661 13f79535-47bb-0310-9956-ffa450edef68
2000-06-22 19:46:23 +00:00
973c011cb7 Fix error messages issued from MPMs which explain where to change
compiled-in limits (e.g., ThreadsPerChild, MaxClients, StartTreads).

missing: the same minor changes for the 2nd BeOS MPM

Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85645 13f79535-47bb-0310-9956-ffa450edef68
2000-06-21 13:15:30 +00:00
0a82e00316 Remove unixd_detach function, because it is provided by APR as ap_detach.
This also modifies the ap_detach function to look like unixd_detach.
Finally all calls to unixd_detach are changed to ap_detach.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85635 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 19:16:18 +00:00
e7a6e84486 fix compile warning
Submitted by:	Victor J. Orlikowski <vjo@raleigh.ibm.com>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85622 13f79535-47bb-0310-9956-ffa450edef68
2000-06-19 22:29:17 +00:00
c0a4cb7873 More consification, correct command initialisation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85599 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 16:29:53 +00:00
750d8cc03c Protect system header files with the appropriate macros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85558 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 23:03:05 +00:00
580852da85 Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85553 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:47:17 +00:00
09076e771a Clean up the stat commit. Basically there was one struct stat that I
missed converting to ap_finfo_t.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85545 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 18:07:43 +00:00
2cf4563fcc Including apr_file_io.h is not necessary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85543 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 17:41:14 +00:00
4f8f778113 Fix typos.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85542 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 17:40:00 +00:00
16748b4e22 Remove the final vestiges of stat.h from Apache 2.0. All calls are now to
ap_stat.  This also adds the new function ap_lstat().  This function is
analogous to lstat.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85535 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 15:29:09 +00:00
eda6e3d23c Add server tokens back to 2.0. Also bring forward the change to allow
the PRODUCT_ONLY value for ServerTokens.  This is relatively clean,
all of the code lives in http_core, and when a module wants to add a token,
they just call ap_add_version_component from the post_config hook.  Actually
ap_add_version_component can be done anytime after the config has been
parsed, it just makes the most sense to do it in post_config IMHO.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85426 13f79535-47bb-0310-9956-ffa450edef68
2000-06-05 19:44:02 +00:00
0cc2db9987 Add pre_config hooks back in for all modules. This is important for the
server tokens code that is coming soon.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85378 13f79535-47bb-0310-9956-ffa450edef68
2000-06-02 15:33:20 +00:00
da493b8be1 PR:
Obtained from:
Submitted by:
Reviewed by:

  Reverse out all _EXPORT_VAR changes back to their original _VAR_EXPORT
  names for linkage (API_, CORE_, and MODULE_).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85318 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 22:40:44 +00:00
5e05af51e4 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85311 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 06:22:55 +00:00
86e2a18f2a This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations.  As with
  the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
  and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.

  I will be happy to revert the inclusion of ap_config.h from 
  httpd.h if this bothers anyone.  More individual modules need
  to be patched if we do so.

  The API_EXPORTs all moved into central storage in the ap_config.h
  header.  Without WIN32 or API_STATIC compile time declarations, 
  these macros remain no-ops.

  This patch also moves the following data from http_main to http_config:

    const char *ap_server_argv0;
    const char *ap_server_root;
    ap_array_header_t *ap_server_pre_read_config;
    ap_array_header_t *ap_server_post_read_config;
    ap_array_header_t *ap_server_config_defines;

  And the following variables had already moved into ap_hooks.c:

    ap_pool_t *g_pHookPool;  (initialized now in http_config)
    int g_bDebugHooks;                   (out of http_config)
    const char *g_szCurrentHookName;     (out of http_config)

  The changes to http_main.c are in preparation for that module to
  move out to a seperate .exe for win32.  Other platforms will be
  unaffected, outside of these changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85309 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 05:28:02 +00:00
93d9ac51ce Fix a memory leak with ap_wait_or_timeout.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85286 13f79535-47bb-0310-9956-ffa450edef68
2000-05-24 00:42:01 +00:00
6fd5974570 Port mpmt_pthread and dexter to the new ap_proc_t code. This works
just fine for these MPMs and it was easy to make the changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85280 13f79535-47bb-0310-9956-ffa450edef68
2000-05-23 21:27:37 +00:00
488983982b Clean up some pid_t vs. int confusion in mpmt_pthread MPM. This is
needed to avoid some warnings on Solaris.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85276 13f79535-47bb-0310-9956-ffa450edef68
2000-05-23 14:05:53 +00:00