Author: minfrin Date: Thu Oct 12 16:11:33 2006 New Revision: 463503 URL: http://svn.apache.org/viewvc?view=rev&rev=463503 Log: 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/ +1: minfrin, rpluem, jim Modified: httpd/httpd/branches/2.2.x/CHANGES httpd/httpd/branches/2.2.x/modules/cache/cache_util.c Modified: httpd/httpd/branches/2.2.x/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=463503&r1=463502&r2=463503 ============================================================================== --- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original) +++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Oct 12 16:11:33 2006 @@ -1,6 +1,15 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.4 + *) 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 ] + *) 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 Modified: httpd/httpd/branches/2.2.x/modules/cache/cache_util.c URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/cache_util.c?view=diff&rev=463503&r1=463502&r2=463503 ============================================================================== --- httpd/httpd/branches/2.2.x/modules/cache/cache_util.c (original) +++ httpd/httpd/branches/2.2.x/modules/cache/cache_util.c Thu Oct 12 16:11:33 2006 @@ -65,6 +65,18 @@ } } + /* 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. */