Commit 468088e7 authored by Graham Leggett's avatar Graham Leggett
Browse files

mod_cache: From RFC3986 (section 6.2.3.) if a URI contains an

authority component and an empty path, the empty path is to be equivalent
to "/". It explicitly cites the following four URIs as equivalents:
  http://example.com
  http://example.com/
  http://example.com:/
  http://example.com:80/


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@450063 13f79535-47bb-0310-9956-ffa450edef68
parent 2c213721
Loading
Loading
Loading
Loading
+9 −0
Changes for CHANGES: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,15 @@
Changes with Apache 2.3.0
  [Remove entries to the current 2.0 and 2.2 section below, when backported]
  *) mod_cache: From RFC3986 (section 6.2.3.) if a URI contains an
     authority component and an empty path, the empty path is to be equivalent
     to "/". It explicitly cites the following four URIs as equivalents:
       http://example.com
       http://example.com/
       http://example.com:/
       http://example.com:80/
     [Davi Arnaut <davi haxent.com.br>]
  *) mod_cache: Don't cache requests with a expires date in the past;
     otherwise mod_cache will always try to cache the URL. This bug
     might lead to numerous rename() errors on win32 if the URL was
+12 −0
Changes for modules/cache/cache_util.c: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -65,6 +65,18 @@ static int uri_meets_conditions(apr_uri_t filter, int pathlen, apr_uri_t url)
        }
    }

    /* For HTTP caching purposes, an empty (NULL) path is equivalent to
     * a single "/" path. RFCs 3986/2396
     */
    if (!url.path) {
        if (*filter.path == '/' && pathlen == 1) {
            return 1;
        }
        else {
            return 0;
        }
    }

    /* Url has met all of the filter conditions so far, determine
     * if the paths match.
     */