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

1897 Commits

Author SHA1 Message Date
William A. Rowe Jr
34202944a9 Some considerable fixes in sending log messages out to the event log.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93343 13f79535-47bb-0310-9956-ffa450edef68
2002-02-08 19:37:47 +00:00
William A. Rowe Jr
69c9e8d02f Drawing attention to the timing problem; push the wait up so we do about
nothing until WinNT initializes the app.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93342 13f79535-47bb-0310-9956-ffa450edef68
2002-02-08 19:37:02 +00:00
Greg Ames
e67dd71c19 update CHANGES for an input side seg fault fix.
also, get rid of a mainframe term that somehow leaked into a comment which
might confuse people.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93334 13f79535-47bb-0310-9956-ffa450edef68
2002-02-08 14:47:10 +00:00
Greg Ames
1c1ce97f3c ensure that ap_rgetline allocates storage for the request line each time it is
called.

This fixes a number of segfaults on daedalus where the first line is
empty (i.e. \r\n followed by a bunch of garbage)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93332 13f79535-47bb-0310-9956-ffa450edef68
2002-02-08 02:25:42 +00:00
Justin Erenkrantz
38969cf175 Fix resolve_symlink to save the original symlink name if known.
We would previously receive APR_INCOMPLETE on symlinks if wanted has
FINFO_NAME set because it isn't supported via apr_stat().  Furthermore, we
don't care what the real name is anyway (even if it apr_stat returned
.name) - we want to call it by the name the symlink says it is.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93328 13f79535-47bb-0310-9956-ffa450edef68
2002-02-07 06:29:57 +00:00
William A. Rowe Jr
eb1fd4e4b1 Eliminate tons o cruft - we are in another thread - and these can all
be longlived malloced regions, or sit upon the stack.  No need to mess
  with pool conflicts.

  The remaining pool accesses are still a problem to resolve.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93327 13f79535-47bb-0310-9956-ffa450edef68
2002-02-07 06:28:45 +00:00
William A. Rowe Jr
73f8d723dd Upon advice of the FirstBill, I began looking for exceptions that occur
only in the service-mode.  SetServiceDescription was borked, now fixed.
  Since we don't use the posix/libc style stderr, I've also pitched that
  code, which was causing an exception.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93326 13f79535-47bb-0310-9956-ffa450edef68
2002-02-07 00:24:12 +00:00
Bradley Nicholes
6e81b18307 Implemented the handling of the SIGABRT signal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93315 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 21:13:57 +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
c1246190bd If we only need to toggle the event, don't ask for the whole ball 'o wax.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93313 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 21:09:26 +00:00
William A. Rowe Jr
9b71731f86 Occifer Will from the Redundacy Dept of Redundancy reporting for duty...
Cleaning up a few more variables and fix a logged err status.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93308 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 19:23:43 +00:00
William A. Rowe Jr
d38559393e Move around a bit of code so I can follow it better. -> EOF should always
take us to the module struct, and working backwards, the register hooks
  and then top-level init stuff.  At least that's how any other Apache
  module is authored.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93306 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 19:06:39 +00:00
William A. Rowe Jr
3e65d196f1 Give the child GENERIC_WRITE only to the stderr log channel,
GENERIC_READ|GENERIC_WRITE to the scoreboard mapping,
  EVENT_MODIFY_STATE|SYNCHRONIZE to it's exit event,
  and fix a _major_ bug in the NullACL code that set the length
  by the size of the pointer-to-acl, rather than the size of an acl.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93300 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 18:23:31 +00:00
Ryan Bloom
24ebef4e2d Be a bit more sane with regard to CanonicalNames. If the user has
specified they want to use the CanonicalName, but they have not
configured a port with the ServerName, then use the same port that
the original request used.

Submitted by:   Ryan Bloom and Ken Coar


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93296 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 16:58:37 +00:00
Justin Erenkrantz
581ada359b We totally disregard the fact that notice is level 5 and always print
that.  Yuck.  Make these error message DEBUG level then.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93295 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 16:56:52 +00:00
Jeff Trawick
0d0add84b0 don't try to place a header field in error-notes if ap_rgetline()
returned something like APR_EOF, since len is not set in this
case and we can go off the end of storage

make sure we set r->status to something when we bail out due
to an error; otherwise, the request goes forward with meaningless
headers


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93294 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 16:19:03 +00:00
Jeff Trawick
7b393b84fe yet another tweak to empty brigade checking on entry to core_input_filter():
since APR_BRIGADE_EMPTY() assumes a non-empty brigade, we have to check
  before invoking that macro

  since APR_BRIGADE_EMPTY() can make a brigade empty, we have to check
  after invoking that macro

An obvious variation of this fix would be to change APR_BRIGADE_NORMALIZE()
to deal with empty brigades.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93293 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 16:16:55 +00:00
William A. Rowe Jr
5cb0ddf326 A cleanup from the redundancy dept. of redundancy
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93281 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 08:14:11 +00:00
William A. Rowe Jr
62d05aef8b Leaky as a sieve.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93280 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 08:11:23 +00:00
William A. Rowe Jr
d1cc4eb611 Didn't mean to leave that in there. MPM works, how well I haven't yet
determined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93279 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 07:31:31 +00:00
William A. Rowe Jr
3bbf558bdf Clean up more bogosity and leaky pipes [and fix a recent bug].
1. The only good assert is a deleted assert.

  2. The child exit event is a very private item, can't pollute into
     other processes we create, shouldn't be named, and should never
     be accessable to anyone but the parent.

  3. We now pass 'handles', not just a single scoreboard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93278 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 07:30:22 +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
William A. Rowe Jr
4eaea0dfe7 1. gotta look at the child return code (think kindergarden, you've got
to keep an eye on those kids.)

  2. gotta return a respectable exit code.

  3. gotta have a few sensible messages.

  4. gotta know where we went.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93276 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 05:53:10 +00:00
William A. Rowe Jr
8eb35fc415 Start simplifying and grouping code. Building on the work that rbb
had begun; we need to start organizing this so it can be groked by
  more than one person at a time [or simply by more than one person.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93275 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 04:27:22 +00:00
Justin Erenkrantz
68f36d57cd Tone down the logging levels for these two messages from ERROR to NOTICE.
It's something to note, but it isn't an error worthy of logging by default.
(Also always log any status values in read_request_line() - incl. timeouts.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93271 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 02:29:54 +00:00
Justin Erenkrantz
85fabad5eb - Fix up a comment so that it makes more sense and explains why we return
APR_EOF instead of an EOS bucket.
- Start to try to be nice when we *know* we are EOS by removing the
  bucket.  This is only one case where we could end up with a 0 bucket
  in ctx->b, but let's remove it and move on.  (If the bucket were to
  return 0 bytes and still have data left to read on blocking mode,
  it's blantly broken, IMHO)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93270 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 02:24:18 +00:00
Justin Erenkrantz
4ffeb3ca6e If the MIME-continuation line returns nothing, then we should return not
segfault.

(A minor change to Jeff's patch is that we ignore the EBCDIC code path.)

Submitted by:	Jeff Trawick
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93269 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 02:20:13 +00:00
William A. Rowe Jr
89de6d1d1a Some compatibility fixes. Built yet untested, read three times through.
Please review and raise the flag if any of these introduce bad mojo.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93264 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 23:17:22 +00:00
William A. Rowe Jr
92817a7be7 Do we have sys/socket.h?
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93263 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 23:13:42 +00:00
Jeff Trawick
6e73c4108a In core_input_filter, check for an empty brigade after
APR_BRIGADE_NORMALIZE().  Otherwise, we can get segfaults if a
client says it will post some data but we get FIN before any
data arrives.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93262 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 22:56:44 +00:00
Ryan Bloom
862f407872 Remove the install_transport_filters hook. The same function can be
acheived with the pre_connection hook.  I have added the socket to the
pre_connection phase to make this possible.
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93259 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 22:18:49 +00:00
William A. Rowe Jr
3648a954cb These crit errors make -0- sense. Interesting info entry, however.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93257 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 22:00:48 +00:00
Jeff Trawick
a0bb255db4 restore the SO_REUSEADDR for listening sockets; it is absolutely
required on most (all?) platforms, regardless of what code changes
might be required to work around the ability on Windows to
inadvertently have more than one server listening on the same ports


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93252 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 12:52:01 +00:00
Ryan Bloom
cb7dad4c73 This change keeps the server from allowing multiple instances to bind to
the same port.  Previously, this was necessary, because the Windows MPM
was binding to the socket in both the parent and child.  Today's code
passes the attached socket to the child from the parent, so we don't need
to re-attach in the child.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93248 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 06:16:04 +00:00
Ryan Bloom
1c8af1bea1 Port the listener bind patch from the Unix MPMs to Windows. This allows
ANy windows bind message to be printed to the console if the server was
started from the command line.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93244 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 01:13:37 +00:00
William A. Rowe Jr
c0e94b16de Fixed for the recent apr-ized logfile changes. The Win32 service never
has a STDERR channel in the first place, so the first ap_open_stderr_log()
  fails.  We need to open it after we've initialized the service control
  manager and created the stderr pipe thread that logs stderr output over
  in our Application Event Log.

  The failure message still looks pretty danged stupid on WinXP however;
  "The Apache2 service on Local Computer started and then stopped."
  [ok, that part is straightforward.]  "Some services stop automatically
  if they have no work to do, for example, the Performance Logs and
  Alerts service."  [that's the bogus bit.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93241 13f79535-47bb-0310-9956-ffa450edef68
2002-02-04 23:37:37 +00:00
William A. Rowe Jr
0e92f35074 NOERRNO? Of course we have an ERRNO :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93240 13f79535-47bb-0310-9956-ffa450edef68
2002-02-04 23:30:37 +00:00
Ryan Bloom
aedb317878 Not being able to bind to a socket is a fatal error. This makes all
MPMs treat it as such.  We now print a message to the console, and return
a non-zero status code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93227 13f79535-47bb-0310-9956-ffa450edef68
2002-02-04 18:41:46 +00:00
Ryan Bloom
19613bbf38 This patch allows the prefork MPM to print messages to the console if it
can't open a socket for some reason.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93224 13f79535-47bb-0310-9956-ffa450edef68
2002-02-04 16:58:54 +00:00
Bill Stoddard
bd3d360392 Reintroduce the create_connection hook. This hook is required to enable
modules to completely take over all network i/o from the core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93171 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 22:16:31 +00:00
Bradley Nicholes
5f4457ace3 Moved the #endif of APR_HAS_SHARED_MEMORY to include a reference
to the global variable ap_scoreboard_shm.  Since this variable was already
being excluded by APR_HAS_SHARED_MEMORY at the beginning of the
file.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93166 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 18:07:08 +00:00
Bradley Nicholes
936f36684e Fixed the unload process so that the console command gets properly
unregistered.  This fixes the 88 unreleased resources after termination


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93161 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 17:29:27 +00:00
Aaron Bannert
fab935b87c Create the scoreboard (in the parent) in a global pool context, so it
survives graceful restarts. This fixes a SEGV during graceful restarts.

Children who attach to this scoreboard keep the same pool as before (pchild)
since they should detach/unmap when the child process exits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93159 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 17:22:57 +00:00
Bradley Nicholes
bef023bf1b Removed the call for now to shutdown the listeners so that threads don't end
up stuck on blocking socket calls during shutdown.  I need to figure out a
cleaner way of preventing this problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93139 13f79535-47bb-0310-9956-ffa450edef68
2002-01-31 19:21:34 +00:00
Ryan Bloom
5cd5470300 Change the Windows MPM to only use the pre_mpm phase in the parent process.
The child processes use the child_init phase to reattach to the shared
memory.  This makes Windows work like Unix, which should make it easier
for module authors to write portable modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93119 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 22:35:57 +00:00
Brian Havard
6490c1dd60 Remove more spmt_os2 MPM leftovers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93102 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 12:32:07 +00:00
Jeff Trawick
90ffe9ae98 get rid of a bunch of warnings about unused variables
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93101 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 11:56:26 +00:00
Brian Pane
a0cae8882d Updated to support the use of the ap_mpm_pod API in worker
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93097 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 06:34:12 +00:00
Brian Pane
d33f04cab0 Added logic to the worker MPM to skip the poll before accept
if there's only one listener socket (based on the implementation
in the prefork MPM).  This also enables us to do single-listener
unserialized accept


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93096 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 06:33:18 +00:00
Ian Holsman
2d386ab438 make it compile on win32
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93094 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 04:37:29 +00:00