1
0
mirror of https://github.com/apache/httpd.git synced 2025-09-01 02:02:06 +03:00
Commit Graph

132 Commits

Author SHA1 Message Date
Ryan Bloom
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
William A. Rowe Jr
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
William A. Rowe Jr
1eeb399c79 Back out or finish up a few non-apr tests. Won't touch proxy at this
moment with a 10 foot pole.  fs_dav is ok... the others need apr'ization


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86418 13f79535-47bb-0310-9956-ffa450edef68
2000-10-06 18:28:27 +00:00
William A. Rowe Jr
7775df3222 Completed review for new tests:
APR_STATUS_IS_EACCES(s)
    APR_STATUS_IS_EEXIST(s)
    APR_STATUS_IS_ENAMETOOLONG(s)
    APR_STATUS_IS_ENOENT(s)

  Where the old EACCES et. al. still exist, we have a problem (not yet
  using APR at all)

  More to come...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86417 13f79535-47bb-0310-9956-ffa450edef68
2000-10-06 17:52:46 +00:00
Greg Ames
7b90751801 Change prefork to use the same listen api as the rest of the unix mpms
(ap_setup_listeners).  This eliminates the need to force a recompile of
listen.c when you switch to/from using prefork.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86179 13f79535-47bb-0310-9956-ffa450edef68
2000-09-08 14:59:46 +00:00
Ryan Bloom
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
Brian Havard
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
William A. Rowe Jr
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
Ryan Bloom
2a87aae0db Convert all of the apr_listen.h to ap_listen.h. This was a side effect
of Doug M. big change last night.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85977 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 14:44:51 +00:00
Doug MacEachern
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
Ryan Bloom
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
Ryan Bloom
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
Ryan Bloom
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
Jeff Trawick
c8131d39e3 Make ap_child_init_lock() work properly... It didn't
call ap_unix_child_init_lock() at the right time, so any
lock mechanism which had interesting work to do (only flock())
was broken.

Fix the flock() flavor of ap_unix_child_init_lock().  It expected
to create the lock file when it should in fact open the existing
one.  It also neglected to return the new ap_lock_t structure to
the caller.

Improve logging of lock init errors in prefork (I know, prefork is
a lame duck, but I used the improved logging in prefork to help
debug the problem).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85861 13f79535-47bb-0310-9956-ffa450edef68
2000-07-19 17:42:56 +00:00
Greg Stein
5f8215e5a0 reverse the setup_listeners() change from a few days ago. it broke prefork
by not getting listenmaxfd set, nor listenfds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85830 13f79535-47bb-0310-9956-ffa450edef68
2000-07-13 09:17:46 +00:00
Bill Stoddard
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
Ryan Bloom
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
Ryan Bloom
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
Ryan Bloom
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
Bill Stoddard
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
Ryan Bloom
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
Jeff Trawick
b5c0ae056b Include strings.h for strcasecmp(), strncasecmp(), and bzero().
Include time.h for time().

This removes a bunch of compiler warnings with gcc -Wall on AIX.
Submitted by:	Jeff Trawick, Victor Orlikowski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85723 13f79535-47bb-0310-9956-ffa450edef68
2000-06-28 14:33:48 +00:00
Ryan Bloom
614f793a09 Since we are initializing the status variable, use the error code
specially set aside for that purpose.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85690 13f79535-47bb-0310-9956-ffa450edef68
2000-06-25 18:23:06 +00:00
Jeff Trawick
9258e49272 Quiet an unhelpful gcc warning which said that stat might be
used before set.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85689 13f79535-47bb-0310-9956-ffa450edef68
2000-06-25 15:53:53 +00:00
Jeff Trawick
a7b78139a5 Fix a few problems checking and logging errors in prefork.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85682 13f79535-47bb-0310-9956-ffa450edef68
2000-06-24 03:47:04 +00:00
Jeff Trawick
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
Ryan Bloom
6878409552 Remove select checks from Apache config. These checks were used to define
ap_select in ap_config.h.  The only file that used ap_select() was
prefork.c.  I have modified prefork.c to use select instead of ap_select.
In the future, this should be modified to use ap_poll like the rest of the
Unix MPMs.  There are other MPMs that are continuing to use select, but this
too should change in time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85663 13f79535-47bb-0310-9956-ffa450edef68
2000-06-22 22:49:50 +00:00
David Reid
7966a8fc69 Add the ap_get_max_daemons to dexter, prefork and spmt_os2 MPM's. The only
one now lacking it is winnt, but that'll need someone form the winnt camp
to sort out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85652 13f79535-47bb-0310-9956-ffa450edef68
2000-06-22 00:28:33 +00:00
Jeff Trawick
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
Ryan Bloom
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
Jeff Trawick
593a57f3a5 Use the new command-handler initializer macros in prefork;
clean up the resulting warnings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85612 13f79535-47bb-0310-9956-ffa450edef68
2000-06-19 00:24:24 +00:00
Ryan Bloom
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
Ryan Bloom
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
Ryan Bloom
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
dgaudet
dfb99092a3 fix nagle
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85495 13f79535-47bb-0310-9956-ffa450edef68
2000-06-10 02:22:15 +00:00
Jeff Trawick
f6e8fe6781 The prefork MPM now uses an APR lock for the accept() mutex.
It has not been getting a lock at all recently.

Note: The TPF and SGI folks need to each APR how to get the most
efficient lock on those platforms.  (For SGI it depends on whether
or not we're building for SMP.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85479 13f79535-47bb-0310-9956-ffa450edef68
2000-06-09 14:48:58 +00:00
Ryan Bloom
cc8eeb2d84 Remove all occurances of gettimeofday. Replace it with ap_now which
provides the same function but works cross-paltform.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85463 13f79535-47bb-0310-9956-ffa450edef68
2000-06-08 00:28:35 +00:00
Ryan Bloom
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
William A. Rowe Jr
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
William A. Rowe Jr
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
William A. Rowe Jr
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
Jeff Trawick
4512225488 Clear up some int vs. pid_t issues in prefork to keep compiles clean
on Solaris.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85290 13f79535-47bb-0310-9956-ffa450edef68
2000-05-24 20:01:18 +00:00
Ryan Bloom
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
Ryan Bloom
f9f4c470a8 Convert ap_proc_t to a complete type. This lets us access the pid directly.
Only the prefork MPM has been ported so far, the rest of the Unix MPM's are
coming later today.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85279 13f79535-47bb-0310-9956-ffa450edef68
2000-05-23 21:04:03 +00:00
Roy T. Fielding
eefcb4c522 Fix warnings on use of common prototypes. Fix bug of printing a
pointer to proc_t instead of the actual pid on error.

Submitted by:	Jeff Trawick, Roy Fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85258 13f79535-47bb-0310-9956-ffa450edef68
2000-05-19 07:14:54 +00:00
Ryan Bloom
c065c11580 Move wait_or_timeout from the MPM's into the new mpm_common.c file. I
also renamed wait_or_timeout to ap_wait_or_timeout for namespace
protection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85250 13f79535-47bb-0310-9956-ffa450edef68
2000-05-19 01:05:26 +00:00
Ryan Bloom
2a648d2111 First function removed from Unix MPM's and moved to a common file. This
work is not anywhere near finished, but the cleanup has begun at least.
Had to make a couple of variables non-static, so a name change was required
since they are now viewable from outside the library.  The advantage to this
is code that is much easier to maintain into the future, because it is
duplicated less often.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85249 13f79535-47bb-0310-9956-ffa450edef68
2000-05-18 23:25:06 +00:00
Jeff Trawick
da18421916 Fix problem where the Unix mpms had an unitialized variable for
child exit status by adding an exit status parameter to
ap_wait_all_procs(); with this change, the mpms use
ap_wait_all_procs() more like they previously used waitpid().

With the introduction of the exit status parameter, the definition
of ap_wait_t was moved from Apache to APR.  There was some handling
of union wait for the type of the exit status parameter to waitpid()
which I retained (but cannot test).  For WIN32, ap_wait_t was defined
as int (in apr.hw).  No current Windows code uses ap_wait_t, but a
type is required so that references to ap_wait_t in apr_thread_proc.h
can compile on Windows.

Note: There is still a storage leak in the way that the Unix mpms call
ap_wait_all_procs()...  this will be resolved at some later time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85243 13f79535-47bb-0310-9956-ffa450edef68
2000-05-18 02:17:30 +00:00
Bill Stoddard
4bd0fe1c28 Create new function, ap_lingering_close(), which will explicitly do a lingering close
if USE_SO_LINGER is not defined. Move responsibility for closing connections out
of http_connection.c and into the MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85194 13f79535-47bb-0310-9956-ffa450edef68
2000-05-11 21:17:00 +00:00
Jeff Trawick
60d03735c0 repair some compile warnings, axe a wasted getsockname() call and
some unnecessary local vars, fix bug in a rare trace of a pid


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85192 13f79535-47bb-0310-9956-ffa450edef68
2000-05-11 20:34:29 +00:00