httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@hyperreal.com>
Subject cvs commit: apache/src CHANGES mod_info.c
Date Sun, 12 Jan 1997 20:50:32 GMT
randy       97/01/12 12:50:31

  Modified:    src       CHANGES mod_info.c
  Log:
  Hah, *squish*!  mod_info.c is making the assumption that the config
  files are relative to ServerRoot.  Looking at the /serv-info, it's
  clear that www.apache.org's server is started with -f and an
  absolute pathname.
  Reviewed by: Randy Terbush, Rasmus Lerdorf
  Submitted by: Ken the Rodent of Unusual Size
  
  Revision  Changes    Path
  1.122     +3 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -C3 -r1.121 -r1.122
  *** CHANGES	1997/01/12 20:22:16	1.121
  --- CHANGES	1997/01/12 20:50:29	1.122
  ***************
  *** 1,5 ****
  --- 1,8 ----
    Changes with Apache 1.2b5
    
  +   *) mod_info assumed that the config files were relative to ServerRoot.
  +      [Ken the Rodent]
  + 
      *) CGI scripts called as an error document resulting from failed
         CGI execution would hang waiting for POST'ed data. [Rob Hartill]
    
  
  
  
  1.9       +20 -10    apache/src/mod_info.c
  
  Index: mod_info.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_info.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** mod_info.c	1997/01/01 18:10:35	1.8
  --- mod_info.c	1997/01/12 20:50:29	1.9
  ***************
  *** 103,116 ****
    	return(ret);
    }
    
  ! mod_info_config_lines *mod_info_load_config(pool *p, char *filename) {
    	char s[MAX_STRING_LEN];
    	FILE *fp;
    	mod_info_config_lines *new, *ret=NULL, *prev=NULL;
  ! 	char *t,*tt,o;
    	
    	fp = pfopen(p,filename,"r");
  ! 	if(!fp) return NULL;
    	while(!cfg_getline(s,MAX_STRING_LEN,fp)) {
    		if(*s=='#') continue; /* skip comments */
    		new = palloc(p,sizeof(struct mod_info_config_lines));
  --- 103,126 ----
    	return(ret);
    }
    
  ! mod_info_config_lines *mod_info_load_config(pool *p, char *filename, request_rec *r) {
    	char s[MAX_STRING_LEN];
    	FILE *fp;
    	mod_info_config_lines *new, *ret=NULL, *prev=NULL;
  ! 	char *t,*tt,o, *msg;
    	
    	fp = pfopen(p,filename,"r");
  ! 	if(!fp) {
  ! 	    msg = pstrcat
  ! 		    (
  ! 			r->pool,
  ! 			"mod_info: couldn't open config file ",
  ! 			filename,
  ! 			NULL
  ! 		    );
  ! 	    log_error (msg, r->server);
  ! 	    return NULL;
  ! 	}
    	while(!cfg_getline(s,MAX_STRING_LEN,fp)) {
    		if(*s=='#') continue; /* skip comments */
    		new = palloc(p,sizeof(struct mod_info_config_lines));
  ***************
  *** 234,240 ****
    
    int display_info(request_rec *r) {
    	module *modp = NULL;
  ! 	char buf[256];
    	command_rec *cmd=NULL;
    	handler_rec *hand=NULL;
    	server_rec *serv = r->server;
  --- 244,250 ----
    
    int display_info(request_rec *r) {
    	module *modp = NULL;
  ! 	char buf[256], *cfname;
    	command_rec *cmd=NULL;
    	handler_rec *hand=NULL;
    	server_rec *serv = r->server;
  ***************
  *** 267,278 ****
    	rputs("<html><head><title>Server Information</title></head>\n",r);
    	rputs("<body><h1 align=center>Apache Server Information</h1>\n",r);
    	if(!r->args || strcasecmp(r->args,"list")) {
  ! 		sprintf(buf,"%s/%s",server_root,server_confname);
  ! 		mod_info_cfg_httpd = mod_info_load_config(r->pool,buf);
  ! 		sprintf(buf,"%s/%s",server_root,serv->srm_confname);
  ! 		mod_info_cfg_srm = mod_info_load_config(r->pool,buf);
  ! 		sprintf(buf,"%s/%s",server_root,serv->access_confname);
  ! 		mod_info_cfg_access = mod_info_load_config(r->pool,buf);
    		if(!r->args) {
    			rputs("<tt><a href=\"#server\">Server Settings</a>, ",r);
    			for(modp = top_module; modp; modp = modp->next) {
  --- 277,288 ----
    	rputs("<html><head><title>Server Information</title></head>\n",r);
    	rputs("<body><h1 align=center>Apache Server Information</h1>\n",r);
    	if(!r->args || strcasecmp(r->args,"list")) {
  ! 		cfname = server_root_relative (r->pool, server_confname);
  ! 		mod_info_cfg_httpd = mod_info_load_config (r->pool, cfname, r);
  ! 		cfname = server_root_relative (r->pool, serv->srm_confname);
  ! 		mod_info_cfg_srm = mod_info_load_config(r->pool, cfname, r);
  ! 		cfname = server_root_relative (r->pool, serv->access_confname);
  ! 		mod_info_cfg_access = mod_info_load_config (r->pool, cfname, r);
    		if(!r->args) {
    			rputs("<tt><a href=\"#server\">Server Settings</a>, ",r);
    			for(modp = top_module; modp; modp = modp->next) {
  
  
  

Mime
View raw message