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 Fri, 31 Aug 2001 13:45:16 GMT
wrowe       01/08/31 06:45:16

  Modified:    server   core.c
  Log:
    Can it be this simple?  No, probably not, but this fast-hack will get
    us going again for a while.
  
    We are currently rejecting some internal file_sub_req()'s in the
    translate phase.  I don't like this hack because of risks it potentially
    exposes, but for today, if we have a filename - and we are a subrequest,
    then let it fly without further mapping.  This allows us to serve up
    the default "/" request (run through mod_dir->mod_negotiation->mod_mime)
    without a 400 error.  The right solution is to set up some traps and
    escapes for the subreq mechanism, possibly with a subreq translate hook,
    and drop the URI entirely for these cases.
  
  Revision  Changes    Path
  1.58      +7 -1      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- core.c	2001/08/30 14:54:50	1.57
  +++ core.c	2001/08/31 13:45:16	1.58
  @@ -2867,13 +2867,19 @@
       void *sconf = r->server->module_config;
       core_server_config *conf = ap_get_module_config(sconf, &core_module);
     
  +    /* XXX We have already been here, or another module did the work
  +     * for us.  At this moment, we will enable only file subrequests.
  +     */
  +    if (r->main && r->filename)
  +        return OK;
  +
       /* XXX this seems too specific, this should probably become
        * some general-case test 
        */
       if (r->proxyreq) {
           return HTTP_FORBIDDEN;
       }
  -    if ((r->uri[0] != '/') && strcmp(r->uri, "*")) {
  +    if (!r->uri || ((r->uri[0] != '/') && strcmp(r->uri, "*"))) {
   	ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
   		     "Invalid URI in request %s", r->the_request);
   	return HTTP_BAD_REQUEST;
  
  
  

Mime
View raw message