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/modules/mappers mod_negotiation.c
Date Mon, 06 Aug 2001 22:42:59 GMT
wrowe       01/08/06 15:42:59

  Modified:    modules/mappers mod_negotiation.c
  Log:
    Thanks goes to Manoj, while commenting on another issue, for triggering
    this idea.  If we find files matching (e.g. index.html.bak matches
    index.html) but they are rejected because we don't understand them
    (e.g. they are a directory, or .bak isn't a mod_mime recognized extension)
    then Error 500 out of here, with a note for the system administrator
    explaining that index.html matches some files, but their extensions
    cannot be grokked.  No more (unintentional, or situational) autoindex :)
  
  Revision  Changes    Path
  1.69      +12 -0     httpd-2.0/modules/mappers/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_negotiation.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- mod_negotiation.c	2001/08/06 19:13:02	1.68
  +++ mod_negotiation.c	2001/08/06 22:42:59	1.69
  @@ -1067,6 +1067,18 @@
   
       apr_dir_close(dirp);
   
  +    /* We found some file names that matched.  None could be served.
  +     * Rather than fall out to autoindex or some other mapper, this
  +     * request must die.
  +     */
  +    if (anymatch && !neg->avail_vars->nelts) {
  +	ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  +		      "Negotiation: discovered file(s) matching request: %s"
  +                      " all containing unrecognized extension(s): ", 
  +                      r->filename);
  +        return HTTP_INTERNAL_SERVER_ERROR;
  +    }
  +
       set_vlist_validator(r, r);
   
       /* Sort the variants into a canonical order.  The negotiation
  
  
  

Mime
View raw message