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
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
extern void sync_scoreboard_image(void);
short_score get_scoreboard_info(int x);
-
+int exists_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;
#include "util_script.h"
#include <time.h>
#include "scoreboard.h"
+#include "http_log.h"
#ifdef NEXT
#include <machine/param.h>
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";
/*