Commit c1dd683d authored by dgaudet's avatar dgaudet
Browse files

PR#566: mod_status dumps core in inetd mode

Submitted by: Marc Slemko and Roy Fielding
Reviewed by:  Marc Slemko, Roy Fielding, Alexei Kosut


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3@78375 13f79535-47bb-0310-9956-ffa450edef68
parent 487ad3e6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Changes with Apache 1.2.1

  *) PR#566: mod_status dumps core in inetd mode.
     [Marc Slemko and Roy Fielding]

  *) Attempt to work around problems with third party libraries that do not
     handle high numbered descriptors (examples include bind, and
     solaris libc).  On all systems apache attempts to keep all permanent
+1 −1
Original line number Diff line number Diff line
@@ -107,4 +107,4 @@ typedef struct

extern void sync_scoreboard_image(void);
short_score get_scoreboard_info(int x);
int exists_scoreboard_image ();
+5 −0
Original line number Diff line number Diff line
@@ -941,6 +941,11 @@ void sync_scoreboard_image ()
#endif
}

int exists_scoreboard_image ()
{
    return (scoreboard_image ? 1 : 0);
}

int update_child_status (int child_num, int status, request_rec *r)
{
    int old_status;
+9 −1
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
#include "util_script.h"
#include <time.h>
#include "scoreboard.h"
#include "http_log.h"

#ifdef NEXT
#include <machine/param.h>
@@ -229,7 +230,14 @@ int status_handler (request_rec *r)
    status[SERVER_BUSY_DNS]='D';
    status[SERVER_GRACEFUL]='G';

    if (r->method_number != M_GET) return NOT_IMPLEMENTED;
    if (!exists_scoreboard_image()) {
         log_printf(r->server, "Server status unavailable in inetd mode");
         return HTTP_NOT_IMPLEMENTED;
     }
    r->allowed = (1 << M_GET) | (1 << M_TRACE);
    if (r->method_number != M_GET) return HTTP_METHOD_NOT_ALLOWED;
    if (!exists_scoreboard_image()) return HTTP_NOT_IMPLEMENTED;

    r->content_type = "text/html";

    /*