httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@hyperreal.org
Subject cvs commit: apache-1.3/src/main http_core.c http_protocol.c http_request.c
Date Thu, 15 Oct 1998 07:58:26 GMT
coar        98/10/15 00:58:26

  Modified:    src/include http_core.h
               src/main http_core.c http_protocol.c http_request.c
  Log:
  	Add a keyword to the Options directive that enables the display
  	of error-notes text in server-generated 500 status pages.  By
  	default, this information will not be included any more (several
  	reports of this exposing sensitive information, so our users
  	don't like it regardless of our opinions).  Adding
  	"Options DebugServerErrors" will enable it.  The keyword is
  	only a placeholder until we come up with a better name.
  	In addition, the type of allow_options_t has been changed
  	from a char to an int; I don't think this warrants an MMN
  	bump because a) that's a core-private type, and b) access to
  	the information is through ap_allow_options(), which extends it
  	to an int anyway.
  	This patch also fixes the problem of partial per-dir config
  	merges if a parse error occurs somewhere in an .htaccess file
  	in the tree.  One instruction of additional overhead, and now
  	.htaccess files with ErrorDocument 500 will work properly
  	for subordinate directories.
  
  PR:		2409, 3173
  
  Revision  Changes    Path
  1.49      +3 -2      apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- http_core.h	1998/08/26 20:01:21	1.48
  +++ http_core.h	1998/10/15 07:58:23	1.49
  @@ -83,6 +83,7 @@
   #define OPT_INCNOEXEC 32
   #define OPT_SYM_OWNER 64
   #define OPT_MULTI 128
  +#define OPT_DEBUG500 256
   #define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_SYM_LINKS|OPT_EXECCGI)
   
   /* options for get_remote_host() */
  @@ -156,7 +157,7 @@
   /*
    * Core is also unlike other modules in being implemented in more than
    * one file... so, data structures are declared here, even though most of
  - * the code that cares really is in http_core.c.  Also, anothre accessor.
  + * the code that cares really is in http_core.c.  Also, another accessor.
    */
   
   char *ap_response_code_string (request_rec *r, int error_index);
  @@ -165,7 +166,7 @@
   
   /* Per-directory configuration */
   
  -typedef unsigned char allow_options_t;
  +typedef unsigned int allow_options_t;
   typedef unsigned char overrides_t;
   
   typedef struct {
  
  
  
  1.233     +3 -0      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.232
  retrieving revision 1.233
  diff -u -r1.232 -r1.233
  --- http_core.c	1998/10/01 04:52:28	1.232
  +++ http_core.c	1998/10/15 07:58:23	1.233
  @@ -994,6 +994,9 @@
   	else if (!strcasecmp(w, "RunScripts")) { /* AI backcompat. Yuck */
   	    opt = OPT_MULTI|OPT_EXECCGI;
   	}
  +	else if (!strcasecmp(w, "DebugServerErrors")) {
  +	    opt = OPT_DEBUG500;
  +	}
   	else if (!strcasecmp(w, "None")) {
   	    opt = OPT_NONE;
   	}
  
  
  
  1.244     +3 -1      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.243
  retrieving revision 1.244
  diff -u -r1.243 -r1.244
  --- http_protocol.c	1998/10/06 19:06:09	1.243
  +++ http_protocol.c	1998/10/15 07:58:24	1.244
  @@ -2385,7 +2385,9 @@
   	             " and inform them of the time the error occurred,\n"
   	             "and anything you might have done that may have\n"
   	             "caused the error.<P>\n", NULL);
  -	    if ((error_notes = ap_table_get(r->notes, "error-notes")) != NULL) {
  +	    if ((ap_allow_options(r) & OPT_DEBUG500)
  +                && (error_notes = ap_table_get(r->notes, "error-notes"))
  +		   != NULL) {
   		ap_bvputs(fd, error_notes, "<P>\n", NULL);
   	    }
   	    break;
  
  
  
  1.134     +6 -4      apache-1.3/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.133
  retrieving revision 1.134
  diff -u -r1.133 -r1.134
  --- http_request.c	1998/10/06 19:06:09	1.133
  +++ http_request.c	1998/10/15 07:58:24	1.134
  @@ -464,10 +464,12 @@
               if (res)
                   return res;
   
  -            if (htaccess_conf)
  -                per_dir_defaults =
  -                    ap_merge_per_dir_configs(r->pool, per_dir_defaults,
  -                                          htaccess_conf);
  +            if (htaccess_conf) {
  +                per_dir_defaults = ap_merge_per_dir_configs(r->pool,
  +							    per_dir_defaults,
  +							    htaccess_conf);
  +		r->per_dir_config = per_dir_defaults;
  +	    }
           }
       }
   
  
  
  

Mime
View raw message