You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/05/10 07:57:56 UTC

[PATCH] PR#566: mod_status dumps core in inetd mode

Some say inetd mode is silly.  Some say useless.  I think it is a good
thing to have around and no reason to break it without need.

If you try to get output from mod_status in inetd mode, Apache core
dumps.  That's not nice.

Although I think this patch is very unlikely to break anything (but some
may disagree with the way it is implemented) I don't especially think it
should go in before 1.2 so we can get 1.2 done with.

Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.143
diff -c -r1.143 http_main.c
*** http_main.c	1997/05/08 07:57:44	1.143
--- http_main.c	1997/05/10 05:43:46
***************
*** 950,955 ****
--- 950,960 ----
  #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;
Index: mod_status.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_status.c,v
retrieving revision 1.47
diff -c -r1.47 mod_status.c
*** mod_status.c	1997/05/08 08:23:31	1.47
--- mod_status.c	1997/05/10 05:43:48
***************
*** 229,235 ****
      status[SERVER_BUSY_DNS]='D';
      status[SERVER_GRACEFUL]='G';
  
!     if (r->method_number != M_GET) return NOT_IMPLEMENTED;
      r->content_type = "text/html";
  
      /*
--- 229,237 ----
      status[SERVER_BUSY_DNS]='D';
      status[SERVER_GRACEFUL]='G';
  
!     if (r->method_number != M_GET) return HTTP_NOT_IMPLEMENTED;
!     if (!exists_scoreboard_image()) return HTTP_NOT_IMPLEMENTED;
! 
      r->content_type = "text/html";
  
      /*
Index: scoreboard.h
===================================================================
RCS file: /export/home/cvs/apache/src/scoreboard.h,v
retrieving revision 1.21
diff -c -r1.21 scoreboard.h
*** scoreboard.h	1997/04/24 23:35:23	1.21
--- scoreboard.h	1997/05/10 05:43:49
***************
*** 107,110 ****
  
  extern void sync_scoreboard_image(void);
  short_score get_scoreboard_info(int x);
! 
--- 107,110 ----
  
  extern void sync_scoreboard_image(void);
  short_score get_scoreboard_info(int x);
! int exists_scoreboard_image ();