cvs commit: apache/src mod_status.c

1996-10-01 Thread Mark J Cox
mjc 96/10/01 05:05:49

  Modified:src   mod_status.c
  Log:
  Fix ?auto report (extra \n's and scoreboard across multiple lines), tidy
  display of Scoreboard key to reduce number of lines output.
  
  Revision  ChangesPath
  1.30  +21 -22apache/src/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_status.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -C3 -r1.29 -r1.30
  *** mod_status.c  1996/08/20 11:51:20 1.29
  --- mod_status.c  1996/10/01 12:05:48 1.30
  ***
  *** 50,56 
 *
 */

  ! /* $Id: mod_status.c,v 1.29 1996/08/20 11:51:20 paul Exp $ */

/* Status Module.  Provide a way of getting at the internal Apache
 * status information without having to worry where the scoreboard is
  --- 50,56 
 *
 */

  ! /* $Id: mod_status.c,v 1.30 1996/10/01 12:05:48 mjc Exp $ */

/* Status Module.  Provide a way of getting at the internal Apache
 * status information without having to worry where the scoreboard is
  ***
  *** 365,407 
rputs(/request,r);
}

  ! rputs(p\n,r);
} /* short_report */
#endif /* STATUS */

  ! /* send the scoreboard 'table' out */

  ! rputs(Scoreboard: \n,r);

if(!short_report)
rputs(PRE,r);
  ! 
  ! rputs(\n,r);

for (i = 0; iHARD_SERVER_LIMIT; ++i)
{
rputc(stat_buffer[i], r);
  ! if(i%STATUS_MAXLINE == (STATUS_MAXLINE - 1))
rputs(\n,r);
}

if (short_report)
  ! {
  ! rprintf(r,\nBusyServers: %d\nIdleServers: %d\n,busy,ready);
  ! }
  ! else 
  ! {
rputs(/PRE\n,r);
  ! rputs(Key:br \n,r);
  ! rputs(\code_/code\ Waiting for Connection, \n,r);
  ! rputs(\codeS/code\ Starting up,br \n,r);
  ! rputs(\codeR/code\ Reading Request, \n,r);
  ! rputs(\codeW/code\ Sending Reply,br \n,r);
  ! rputs(\codeK/code\ Keepalive (read), \n,r);
  ! rputs(\codeD/code\ DNS Lookup, \n,r);
  ! rputs(\codeL/code\ Loggingp\n,r);
  ! rprintf(r,\n%d requests currently being processed, %d idle 
servers\n
  ! ,busy,ready);
}

#if defined(STATUS)
  --- 365,406 
rputs(/request,r);
}

  ! rputs(br\n,r);
} /* short_report */
#endif /* STATUS */

  ! if (!short_report)
  ! rprintf(r,\n%d requests currently being processed, %d idle 
servers\n
  ! ,busy,ready);
  ! else
  ! rprintf(r,BusyServers: %d\nIdleServers: %d\n,busy,ready);

  ! /* send the scoreboard 'table' out */

if(!short_report)
rputs(PRE,r);
  ! else
  ! rputs(Scoreboard: ,r);

for (i = 0; iHARD_SERVER_LIMIT; ++i)
{
rputc(stat_buffer[i], r);
  ! if((i%STATUS_MAXLINE == (STATUS_MAXLINE - 1))!short_report)
rputs(\n,r);
}

if (short_report)
  ! rputs(\n,r);
  ! else {
rputs(/PRE\n,r);
  ! rputs(Scoreboard Key: br\n,r);
  ! rputs(\Bcode_/code/B\ Waiting for Connection, \n,r);
  ! rputs(\BcodeS/code/B\ Starting up, \n,r);
  ! rputs(\BcodeR/code/B\ Reading Request,BR\n,r);
  ! rputs(\BcodeW/code/B\ Sending Reply, \n,r);
  ! rputs(\BcodeK/code/B\ Keepalive (read), \n,r);
  ! rputs(\BcodeD/code/B\ DNS Lookup, \n,r);
  ! rputs(\BcodeL/code/B\ Loggingp\n,r);
}

#if defined(STATUS)
  
  
  


cvs commit: apache/src/modules/proxy mod_proxy.h proxy_cache.c proxy_connect.c proxy_ftp.c proxy_http.c proxy_util.c Makefile mod_proxy.c

1996-10-01 Thread Chuck Murcko
chuck   96/10/01 00:11:48

  Modified:src/modules/proxy  Makefile mod_proxy.c
  Added:   src/modules/proxy  mod_proxy.h proxy_cache.c proxy_connect.c
proxy_ftp.c  proxy_http.c proxy_util.c
  Log:
  Phase II - The Great Proxy Reorganization
  
  Layout with protocol abstraction, daemon gc in mind.
  
  Revision  ChangesPath
  1.3   +15 -11apache/src/modules/proxy/Makefile
  
  Index: Makefile
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/Makefile,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** Makefile  1996/09/29 13:58:55 1.2
  --- Makefile  1996/10/01 07:11:41 1.3
  ***
  *** 50,56 
# 
# Makefile for the Apache proxy library
# 
  ! # $Id: Makefile,v 1.2 1996/09/29 13:58:55 chuck Exp $
#

SHELL = /bin/sh
  --- 50,56 
# 
# Makefile for the Apache proxy library
# 
  ! # $Id: Makefile,v 1.3 1996/10/01 07:11:41 chuck Exp $
#

SHELL = /bin/sh
  ***
  *** 59,70 

LIB=libproxy.a

  ! # define -DEXPLAIN if you want verbose debugging output
CFLAGS=-I. -I$(INCDIR) $(AUX_CFLAGS)

# Internal stuff, should not need changing.
  ! OBJS=mod_proxy.o
  ! PROXYSRC=mod_proxy.c

default:$(LIB)

  --- 59,73 

LIB=libproxy.a

  ! # AUX_CFLAGS comes from higher level Makefile
CFLAGS=-I. -I$(INCDIR) $(AUX_CFLAGS)

# Internal stuff, should not need changing.
  ! OBJS=mod_proxy.o proxy_cache.o proxy_connect.o proxy_ftp.o proxy_http.o \
  ! proxy_util.o
  ! 
  ! PROXYSRC=mod_proxy.c proxy_cache.c proxy_connect.c proxy_ftp.c proxy_http.c 
\
  ! proxy_util.c

default:$(LIB)

  ***
  *** 74,86 
$(RANLIB) $@

# dependencies
  ! mod_proxy.o: $(INCDIR)/http_log.h
  ! mod_proxy.o: $(INCDIR)/http_main.h
  ! mod_proxy.o: $(INCDIR)/http_protocol.h
  ! mod_proxy.o: $(INCDIR)/http_config.h
  ! mod_proxy.o: $(INCDIR)/httpd.h
  ! mod_proxy.o: $(INCDIR)/md5.h
  ! mod_proxy.o: $(INCDIR)/explain.h

# various forms of cleanup
tidy:
  --- 77,90 
$(RANLIB) $@

# dependencies
  ! mod_proxy.o proxy_cache.o proxy_connect.o proxy_ftp.o proxy_http.o \
  ! proxy_util.o: mod_proxy.h
  ! mod_proxy.o: $(INCDIR)/httpd.h $(INCDIR)/http_config.h
  ! proxy_cache.o: $(INCDIR)/httpd.h $(INCDIR)/http_config.h $(INCDIR)/md5.h
  ! proxy_connect.o: $(INCDIR)/httpd.h $(INCDIR)/http_config.h
  ! proxy_ftp.o: $(INCDIR)/httpd.h $(INCDIR)/http_config.h
  ! proxy_http.o: $(INCDIR)/httpd.h $(INCDIR)/http_config.h
  ! proxy_util.o: $(INCDIR)/httpd.h $(INCDIR)/http_config.h $(INCDIR)/md5.h

# various forms of cleanup
tidy:
  
  
  
  1.3   +51 -3052  apache/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** mod_proxy.c   1996/09/29 14:10:58 1.2
  --- mod_proxy.c   1996/10/01 07:11:42 1.3
  ***
  *** 50,197 
 *
 */

  ! /* $Id: mod_proxy.c,v 1.2 1996/09/29 14:10:58 chuck Exp $ */

  ! /*
  ! Note that the Explain() stuff is not yet complete.
  ! Also note numerous FIXMEs and CHECKMEs which should be eliminated.
  ! 
  ! If TESTING is set, then garbage collection doesn't delete ... probably a 
good
  ! idea when hacking.
  ! 
  ! This code is still experimental!
  ! 
  ! Things to do:
  ! 
  ! 1. Make it garbage collect in the background, not while someone is waiting 
for
  ! a response!
  ! 
  ! 2. Check the logic thoroughly.
  ! 
  ! 3. Empty directories are only removed the next time round (but this does 
avoid
  ! two passes). Consider doing them the first time round.
  ! 
  ! Ben Laurie [EMAIL PROTECTED] 30 Mar 96
  ! 
  ! More things to do:
  ! 
  ! 0. Massive code cleanup  break into multiple files; link as a lib
  ! 
  ! 1. add PASV mode for ftp now that it works
  ! 
  ! 2. Add gopher  WAIS
  ! 
  ! 3. Various other fixups to insure no NULL strings parsed, etc.
  ! 
  ! 4. NoProxy directive for excluding sites to proxy
  !  
  ! 5. Imply NoCache * if cache directory is not configured, to enable proxy
  !without cache (and avoid SIGSEGV)
  !  
  ! 6. Implement protocol handler struct a la Apache module handlers
  !  
  ! 7. Use a cache expiry database for more efficient GC
  ! 
  ! 8. Handle multiple IPs for doconnect()
  ! 
  ! 9. Bulletproof GC against SIGALRM
  ! 
  ! Chuck Murcko [EMAIL PROTECTED] 28 Sep 96
  ! 
  ! */
  ! 
  ! #define TESTING 0
  ! #undef EXPLAIN
  ! 
  ! #include httpd.h
  ! #include http_config.h
  ! #include http_log.h
  ! #include http_main.h
  ! #include http_protocol.h
  ! 
  ! #include md5.h
  ! 
  ! #include utime.h
  ! 
  ! #include explain.h
  ! 
  !