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

149 Commits

Author SHA1 Message Date
Bradley Nicholes
8c61c4d21e Added NETWARE to the #ifdef list
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91691 13f79535-47bb-0310-9956-ffa450edef68
2001-10-29 22:56:42 +00:00
Ryan Bloom
61cebdad7a Clean up the string passed to the error log hook. This removes the date,
time, error level, etc strings.  The only information in the string is
the actual error.
Submitted by:	Jon Travis <jtravis@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91373 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 23:28:57 +00:00
Justin Erenkrantz
a8a56e00c5 Switch back to SIGUSR1 for graceful restarts on all platforms that
support it.  This defines a symbol called AP_SIG_GRACEFUL in
ap_config_auto.h which will have the appropriate signal value.  All
direct references to SIGWINCH have been replaced with AP_SIG_GRACEFUL.

On Linux 2.0, use SIGWINCH instead since SIGUSR1 is used by glibc
2.0's user-space threading library to control threads.  All later
versions of Linux/glibc don't have this problem.  (Not to mention the
security holes in older Linux versions which make it unsuitable for
use as a web server.)  If your platform doesn't have SIGUSR1, use the
appropriate mojo in configure to define what your graceful restart
signal should be.

In theory, a configure switch could be added to allow the admin to
specify the appropriate signal that should be used.  This is left
as an exercise to the reader for now.

The docs need to be updated.  Since the signal is now configurable,
just saying SIGUSR1 for graceful restart isn't completely true.  Also,
the apachectl functionality needs to be moved into httpd - this is
what Win32 does and it makes us consistent across platforms.

Roy issued a veto against use of SIGWINCH by default, so this should
resolve that veto.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91076 13f79535-47bb-0310-9956-ffa450edef68
2001-09-18 22:13:59 +00:00
Victor J. Orlikowski
45b321443b httpd.exp and lots of other export files are generated based on the
AP[RU]_DECLARE macros. This commit gets mod_cgid working again as a DSO on
AIX.
However, this brings up the need to look for any functions that are
available as part of the API, and AP[RU]_DECLAREing them, so things don't
blow up in DSOs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89790 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 17:55:38 +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
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
Ryan Bloom
06ca840aa4 Add a new request phase, for allowing management modules to forward
error logs to their management agents.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89281 13f79535-47bb-0310-9956-ffa450edef68
2001-06-06 22:24:54 +00:00
Bill Stoddard
8e7c9a7d88 Fix a segfault in apr_proc_other_child_unregister. Jeff recently made
a change in APR otherchild.c to unregister all OC registrations as
part of pool cleanup.  This means that we must NOT explicitly call
apr_proc_other_child_unregister out of other pool clean-up routines.
In this case, the OC cleanup was being called first then the piped_log_cleanup
was being called which called apr_proc_other_child_unregister.

We could fix this by detecting the case when there are no more OCs registered
in apr_proc_other_child_unregister but that might just mask other problems we
need to fix anyway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89133 13f79535-47bb-0310-9956-ffa450edef68
2001-05-17 12:10:22 +00:00
Victor J. Orlikowski
91da6bd0cf Remove a needless assignment.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88802 13f79535-47bb-0310-9956-ffa450edef68
2001-04-10 23:17:59 +00:00
Victor J. Orlikowski
81dd463659 Missed one...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88792 13f79535-47bb-0310-9956-ffa450edef68
2001-04-10 18:44:09 +00:00
Victor J. Orlikowski
a3dd2c0710 *Sigh*. Pointless repetition of calculations. It bothers me. Even if
it is simple bitwise AND.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88790 13f79535-47bb-0310-9956-ffa450edef68
2001-04-10 18:03:46 +00:00
William A. Rowe Jr
6a18920620 Hmmm... this made things easier for me to read a while back, perhaps
someone else may appreciate


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88687 13f79535-47bb-0310-9956-ffa450edef68
2001-04-03 06:02:41 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
Greg Stein
e7e115c624 *) include "apr_signal.h" when needed
*) some other minor include tweaks


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88081 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 01:08:24 +00:00
Greg Stein
bb282b75f7 Clean up some of the includes:
- explicitly include apr_lib.h since ap_config.h doesn't
- use apr_want.h where possible
- use APR_HAVE_ where possible
- remove some unneeded includes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 13:05:29 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
William A. Rowe Jr
7f4a5fe7f5 Use the appropriate APR_FINFO_flags for the apr_stat/lstat/getfileinfo
calls to avoid ownership and permissions on Win32 when they are not
  required, and until they are implemented.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87873 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 21:28:28 +00:00
William A. Rowe Jr
cd1ef027c2 The changes required for the APR_FINFO_wanted argument to
apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
  are simply the required changes to get the server working.
  The size of the patch is a warning about how we need to
  really look at what we are trying to accomplish with all
  of these stat/lstat calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87760 13f79535-47bb-0310-9956-ffa450edef68
2001-01-20 21:42:23 +00:00
William A. Rowe Jr
7c8a252a45 Some missing exports
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87725 13f79535-47bb-0310-9956-ffa450edef68
2001-01-18 23:52:03 +00:00
Jeff Trawick
095717c705 get rid of some bogus uses of perror()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87620 13f79535-47bb-0310-9956-ffa450edef68
2001-01-09 00:27:03 +00:00
Brian Havard
68b9d88f89 Fix message when the error log file can't be opened.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87610 13f79535-47bb-0310-9956-ffa450edef68
2001-01-08 13:25:02 +00:00
Jeff Trawick
a65b522fb9 Set up stderr logging explictly early in initialization so that a pool is
available for creating the APR representation of stderr.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87583 13f79535-47bb-0310-9956-ffa450edef68
2001-01-04 18:22:50 +00:00
Ryan Bloom
2af4c27d36 We have a pool in this function, and log_error_core needs a pool in order
to open stderr successfully.  By using ap_log_perror, we can pass a valid
pool down to log_error_core


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87561 13f79535-47bb-0310-9956-ffa450edef68
2000-12-31 23:41:07 +00:00
Ryan Bloom
e417013fbc Use a real pool to dup the error log file descriptor.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87560 13f79535-47bb-0310-9956-ffa450edef68
2000-12-31 19:19:07 +00:00
Greg Stein
ead2dae94c *) Compensate for recent changes in the APR headers. Specifically, some
files need to specifically include stdio.h, or a particular apr_*.h
   header.

*) Adjust callers of apr_create_process() to deal with the extra "const"

*) Add "const" to args of ap_os_create_privileged_process()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87080 13f79535-47bb-0310-9956-ffa450edef68
2000-11-26 04:47:43 +00:00
William A. Rowe Jr
68ded31f4f *) Accomodate an out-of-space condition in the piped logs and the
rotatelogs.c code, and no longer churn log processes for this
     condition.  [Victor J. Orlikowski]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87049 13f79535-47bb-0310-9956-ffa450edef68
2000-11-21 18:40:38 +00:00
Ryan Bloom
8a75c27537 Add the referer to the error log if one is available.
PR:	73
Submitted by:	Markus Gyger <mgyger@itr.ch>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86951 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 02:42:51 +00:00
Ryan Bloom
140586d14f Namespace protect the rest of the macros defined by ap_config.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86661 13f79535-47bb-0310-9956-ffa450edef68
2000-10-19 00:05:00 +00:00
Ryan Bloom
16a54f95b0 Fix piped logs in 2.0. This basically:
1) cleans up an annoying type that was getting in my way while I was
   trying to fix things.
2) Makes some of the allocations pcalloc instead of palloc
3) The arg array passed to create_process is a const *char *, not
   const *char [].
PR:     6642


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86640 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 06:09:10 +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
Brian Havard
aed89bc6b4 Add #include <unistd.h> for getpid() prototype.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86010 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 14:34:22 +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
0356da996c Remove some old APIs. These were left around for legacy modules. Since
we have broken all modules anyway, this is a good time to cleanup a bit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85999 13f79535-47bb-0310-9956-ffa450edef68
2000-08-05 17:32:08 +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
William A. Rowe Jr
84fb2aec23 This should be clean... ap_snprintf already holds a byte for the
null terminator, and this patch sets aside whatever space is needed
  for the newline termination.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85880 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 02:05:49 +00:00
William A. Rowe Jr
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
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
Ryan Bloom
0207f837c4 Apache doesn't actually check for stdarg.h, but APR does. Just use the
APR defined APR_HAVE_STDARG_H to check for the existance of stdarg.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85833 13f79535-47bb-0310-9956-ffa450edef68
2000-07-13 16:26:47 +00:00
Bill Stoddard
51810589f5 Save the write end of the pipe. pipe_log_spawn really needs to be combined with
log_child.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85828 13f79535-47bb-0310-9956-ffa450edef68
2000-07-12 22:00:58 +00:00
Bill Stoddard
af21383533 Ooops... Didn't notice this one until I tried compiling with APR_HAS_OTHER_CHILD
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85826 13f79535-47bb-0310-9956-ffa450edef68
2000-07-12 18:54:55 +00:00
Bill Stoddard
c8527e9280 Fix a nasty stack corruption. ap_proc_t should be allocated out of the same
pool passed to ap_create_process. A little further down the road to getting
reliable piped logs working on Win32.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85825 13f79535-47bb-0310-9956-ffa450edef68
2000-07-12 18:40:26 +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
Jeff Trawick
87e0219916 ap_create_pipe was changed to return a pipe with both handles
blocking (previously, both handles were non-blocking).

ap_set_pipe_timeout() is now the only way to manipulate the
blocking state of the pipe.  Pass -1 for timeout to make it
blocking; pass 0 for timeout to make it non-blocking.

ap_block_pipe() is gone.

A few minor bugs were fixed along the way.

OS-specific notes:

non-Unix in general:

Only Unix/BeOS currently has the optimization to keep track of the blocking
state.  This is used to avoid syscalls as well as to handle ap_put_os_file(),
which is a case where we don't know the blocking state of the handle we are
given.

OS/2:

ap_set_pipe_timeout() with timeout value > 0: The code didn't play with
the blocking state before and it doesn't still.  I did add logic for special
timeout values 0 and -1 to play with the blocking state.

ap_create_pipe():  old logic didn't do anything with the blocking state
of the second handle; it still doesn't; hopefully it is blocking

pre-BONE BEOS:

old code to make a pipe non-blocking was a no-op; now it returns
APR_ENOTIMPL

BONE: old code to make a pipe non-blocking; it passed &zero as the
parm to FIONBIO instead of &one; this bug was fixed

Win32:

The pipe was always created blocking before; no change

previously, ap_setprocattr_io() ignored the blocking flag; now it
respects it like other platforms and calls ap_set_pipe_timeout(p,0)
on appropriate pipe handles (Bill Stoddard was just working in
ap_set_pipe_timeout(), so I presume this is golden)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85637 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 19:36:50 +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
Jeff Trawick
bfbb1c736d Fix logging of errors creating the httpd.pid file.
perror() was converted to ap_log_error(), which will interpret the
specified APR error code properly.

The existing ap_log_error() call was changed so that the message is
formatted properly.  Note that this call is made from the mpm after
we detach from the foreground process, so it can only appear in the
log.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85551 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:39:57 +00:00
Jeff Trawick
93a6d2f3a7 Back out ap_set_default_perms(). Remove old logic to play with umask
around the creation of the httpd.pid file.  Pass explicit permissions to
ap_open(), omitting write-ability except by the owning user.  As always,
we end up with rw-r--r-- for the permissions unless the umask is something
unusual.

Note that the OS/2 and Win32 implementations of ap_open() ignore the
permissions parameter altogether.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85550 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:08:25 +00:00
Ryan Bloom
b44c18edd7 Add a new function ap_set_default_fperms. This allows people to set the
umask to be used when creating files.  This should change the permissions
of files created using APR_DEFAULT_OS.  Also removed a warning introduced
with the sys/stat.h changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85537 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 16:00:33 +00:00
Ryan Bloom
9803fc27fd Remove all occurances of strerror from Apache. ap_strerror works just
fine with standard errno values, and it is more portable.  This also allows
me to remove the check for strerror from Apache's configure script.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85486 13f79535-47bb-0310-9956-ffa450edef68
2000-06-09 18:57:16 +00:00
Jeff Trawick
130e171d62 Increase the size of the buffer passed to ap_strerror(); I saw
truncation of a particularly long message on OS/390, and useful
info was past char 100.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85443 13f79535-47bb-0310-9956-ffa450edef68
2000-06-06 14:51:06 +00:00
Ryan Bloom
6c75ebc1da Rename stdin, stdout, stderr from new ap_proc_t to in, out, and err because
Windows was having problems with the original names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85285 13f79535-47bb-0310-9956-ffa450edef68
2000-05-24 00:15:09 +00:00