httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Mon, 25 Oct 2004 10:24:18 GMT
niq         2004/10/25 03:24:17

  Modified:    server   protocol.c
  Log:
  PR: 31875
  Fix URI parsing bug in case of a leading double-slash
  
  Revision  Changes    Path
  1.157     +10 -0     httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- protocol.c	25 Oct 2004 06:40:08 -0000	1.156
  +++ protocol.c	25 Oct 2004 10:24:17 -0000	1.157
  @@ -502,6 +502,16 @@
   
       r->unparsed_uri = apr_pstrdup(r->pool, uri);
   
  +    /* http://issues.apache.org/bugzilla/show_bug.cgi?id=31875
  +     * http://issues.apache.org/bugzilla/show_bug.cgi?id=28450
  +     *
  +     * This is not in fact a URI, it's a path.  That matters in the
  +     * case of a leading double-slash.  We need to resolve the issue
  +     * by normalising that out before treating it as a URI.
  +     */
  +    while ((uri[0] == '/') && (uri[1] == '/')) {
  +        ++uri ;
  +    }
       if (r->method_number == M_CONNECT) {
           status = apr_uri_parse_hostinfo(r->pool, uri, &r->parsed_uri);
       }
  
  
  

Mime
View raw message