httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Thu, 13 Dec 2001 05:49:28 GMT
wrowe       01/12/12 21:49:28

  Modified:    server   core.c
  Log:
    Now all should be well.  AcceptPathInfo on will give us a document with
    path_info served from the core handler.  Any filters can then manipulate
    all the usual CGI envvars [as proven with this little excerpt with a
    <!--#printenv --> document...
  
  <FilesMatch ".*\.shtml.*">
      Options +Includes
      SetOutputFilter INCLUDES
      AcceptPathInfo on
  </FilesMatch>
  
    a potentially questionable config, but effective.
  
  Revision  Changes    Path
  1.117     +25 -0     httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- core.c	2001/12/13 02:35:31	1.116
  +++ core.c	2001/12/13 05:49:27	1.117
  @@ -131,6 +131,7 @@
       conf->override = dir ? OR_UNSET : OR_UNSET|OR_ALL;
   
       conf->content_md5 = 2;
  +    conf->accept_path_info = 2;
   
       conf->use_canonical_name = USE_CANONICAL_NAME_UNSET;
   
  @@ -163,6 +164,7 @@
       conf->handler = NULL;
       conf->output_filters = NULL;
       conf->input_filters = NULL;
  +
       return (void *)conf;
   }
   
  @@ -253,6 +255,9 @@
       if ((new->content_md5 & 2) == 0) {
           conf->content_md5 = new->content_md5;
       }
  +    if ((new->accept_path_info & 2) == 0) {
  +        conf->accept_path_info = new->accept_path_info;
  +    }
       if (new->use_canonical_name != USE_CANONICAL_NAME_UNSET) {
   	conf->use_canonical_name = new->use_canonical_name;
       }
  @@ -1769,6 +1774,14 @@
       return NULL;
   }
   
  +static const char *set_accept_path_info(cmd_parms *cmd, void *d_, int arg)
  +{
  +    core_dir_config *d=d_;
  +    
  +    d->accept_path_info = arg != 0;
  +    return NULL;
  +}
  +
   static const char *set_use_canonical_name(cmd_parms *cmd, void *d_,
   					  const char *arg)
   {
  @@ -2424,6 +2437,8 @@
   #endif
   AP_INIT_TAKE1("AddDefaultCharset", set_add_default_charset, NULL, OR_FILEINFO, 
     "The name of the default charset to add to any Content-Type without one or 'Off' to disable"),
  +AP_INIT_FLAG("AcceptPathInfo", set_accept_path_info, NULL, OR_FILEINFO,
  +  "whether or not files with PATH_INFO will be served by the core handler"),
   
   /* Old resource config file commands */
     
  @@ -2666,6 +2681,16 @@
   
       if (conf->handler && strcmp(conf->handler, "none"))
           r->handler = conf->handler;
  +
  +    /* Deal with the poor soul who is trying to force path_info to be
  +     * accepted within the core_handler, where they will let the subreq
  +     * address it's contents.  This can only be toggled on by the user,
  +     * and modules can't override the user's discresion, except in their
  +     * own module fixup phase.
  +     */
  +    if (!r->used_path_info & (conf->accept_path_info & 1)) {
  +        r->used_path_info = conf->accept_path_info;
  +    }
   
       return OK;
   }
  
  
  

Mime
View raw message