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

225 Commits

Author SHA1 Message Date
Victor J. Orlikowski
d982829aa1 Continue the Bill Rowe apr_size_t crusade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95993 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 06:01:14 +00:00
William A. Rowe Jr
178e10e3da Well the wrappers work out well... nice to be able to put off committing
these API changes until the evening ;)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95587 13f79535-47bb-0310-9956-ffa450edef68
2002-06-09 03:44:03 +00:00
William A. Rowe Jr
07fe8d864d Clean up new compiler emit noise
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95455 13f79535-47bb-0310-9956-ffa450edef68
2002-05-31 21:01:58 +00:00
Justin Erenkrantz
37b3fdc9d1 Simplify ap_read_pid and make it more portable.
- Switch to using apr_file_read_full()
- Stop checking for \n (non-portable)
- Error if we read the entire buffer or the first digit isn't a number


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95338 13f79535-47bb-0310-9956-ffa450edef68
2002-05-29 04:39:07 +00:00
Jeff Trawick
6fba81114c add ap_log_pid() for reading an Apache pid file
Submitted by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95235 13f79535-47bb-0310-9956-ffa450edef68
2002-05-23 12:19:09 +00:00
Jeff Trawick
c871b41d3c stop using APLOG_NOERRNO in calls to ap_log_?error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:11:39 +00:00
Jeff Trawick
3d54d08394 ignore APLOG_NOERRNO; note that it is deprecated
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95148 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 10:48:06 +00:00
Bill Stoddard
f0cee8f8fb Added the APLOG_TOCLIENT flag to ap_log_rerror() to
explicitly tell the server that warning messages should be sent
to the client in addition to being recorded in the error log.
Prior to this change, ap_log_rerror() always sent warning
messages to the client. In one case, a faulty CGI script caused
the server to send a warning message to the client that contained
the full path to the CGI script. This could be considered a
minor security exposure.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94744 13f79535-47bb-0310-9956-ffa450edef68
2002-04-22 03:25:40 +00:00
Justin Erenkrantz
7f594c679f Fix 'control reaches end of non-void function' warning
Submitted by:	Ben Collins-Sussman <sussman@collab.net>
Tweaked by:	    Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94695 13f79535-47bb-0310-9956-ffa450edef68
2002-04-18 08:27:28 +00:00
William A. Rowe Jr
a43f5c4eb3 Introduced -E startup_logfile_name option to httpd to allow admins
to begin logging errors immediately.  This provides Win32 users
     an alternative to sending startup errors to the event viewer, and
     allows other daemon tool authors an alternative to logging to stderr.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94681 13f79535-47bb-0310-9956-ffa450edef68
2002-04-17 16:36:28 +00:00
William A. Rowe Jr
fc979c95b9 Spell out the merged log name, if we succeeded in merging the path
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93986 13f79535-47bb-0310-9956-ffa450edef68
2002-03-17 23:17:28 +00:00
Jeff Trawick
5aea2e8d73 get the prototype for ap_recent_ctime()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93980 13f79535-47bb-0310-9956-ffa450edef68
2002-03-17 12:40:16 +00:00
Brian Pane
e3bfcb1430 Use the "recent time" cache to optimize timestamp generation for
the httpd error log

Background: According to some profile data that we collected on Solaris,
half the run time of ap_log_rerror() was spent in localtime(3).   With
this change, the recent-time cache ensures that the error logger won't
cause more than one localtime() call per second, no matter how high the
error rate is.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93977 13f79535-47bb-0310-9956-ffa450edef68
2002-03-17 05:13:12 +00:00
William A. Rowe Jr
65a37752ec Eliminate potential ap_server_root_relative segfaults, with the input
of Jeff Trawick's style changes to the first patches.  Doesn't include
  the fixes to ssl [more complex], and we won't trap errors that involve
  ap_serverroot, since we presume that was normalized on the way in.
  Therefore, testing ap_server_root_relative(DEFAULT_FOO) cases
  should never become necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93965 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 18:26:58 +00:00
Jeff Trawick
2df1a02f72 deal with the rename of kill_after_timeout to APR_KILL_AFTER_TIMEOUT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93940 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 22:19:14 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Ian Holsman
17cc70b4ab Sander's Stylistic Submission
(de-tab)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93717 13f79535-47bb-0310-9956-ffa450edef68
2002-03-05 20:43:24 +00:00
William A. Rowe Jr
402a038805 Whoh boy that's rough... We sometimes like to answer SIGHUP in the
parent process, don't we?

  This -was- post-fork() in 1.3, but with the massive restructuring,
  we inadvertantly now whack the parent process.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93587 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 03:52:20 +00:00
William A. Rowe Jr
67d6dd0743 This code seriously misassumed (and may yet) that stderr was a valid file.
It also has some bogus non-apr code that probably does great evil to win32
  services.  This must be bumped into .32, code review is incomplete still.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93368 13f79535-47bb-0310-9956-ffa450edef68
2002-02-12 00:11:34 +00:00
Bradley Nicholes
e8ad3e9a9d Removed the #ifdef NETWARE to allow the standard abort() function to
be called.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93314 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 21:13:28 +00:00
William A. Rowe Jr
d6e5c5c356 BS. This isn't an assert. This is a friggin developer's black hole.
Suggesion: Netware needs to implement the appropriate abort() style
  fn.  If there is none on Netware, this is non-portable, undebuggable,
  and will be yanked by tommorow evening.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93277 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 07:25:01 +00:00
Aaron Bannert
f9c71f11ab Bring apache in line with the new apr_file_dup2() parameter type.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92992 13f79535-47bb-0310-9956-ffa450edef68
2002-01-24 04:31:01 +00:00
William A. Rowe Jr
a5a68267b1 Allow the user to get detailed debugging information without a full
recompile [absolutely necessary on Win32 and other platforms that
  really don't support administrator-compilation.]

  -e level  follows the LogLevel options.

  The only question, should -e override the compiled-in default for
  the creation of the server_rec?  No strong feeling either way, here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92891 13f79535-47bb-0310-9956-ffa450edef68
2002-01-17 20:15:12 +00:00
William A. Rowe Jr
fe0338efa3 Subset of another, have piped_log_cleanup_for_exec handle
the dirtywork common to piped_log_cleanup


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92890 13f79535-47bb-0310-9956-ffa450edef68
2002-01-17 18:13:51 +00:00
David Reid
913291f2b6 This brings apache back in line with apr following the addition
of apr_file_dup2.

Until Win32 and OS/2 have the function added this will break their
builds, but Will Rowe has said he'll do it this morning and asked for
the patch to apr to go in :)  Go Will!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92824 13f79535-47bb-0310-9956-ffa450edef68
2002-01-11 09:14:34 +00:00
Aaron Bannert
ad93d0bd03 Style and formatting changes only. Removed tabs, reduced long lines,
aligned parameters, added braces around some single-statement basic
blocks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92518 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 19:42:20 +00:00
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