[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-cvs
Subject:    svn commit: r450063 - in /httpd/httpd/trunk: CHANGES
From:       minfrin () apache ! org
Date:       2006-09-26 14:36:44
Message-ID: 20060926143645.3CBD41A981A () eris ! apache ! org
[Download RAW message or body]

Author: minfrin
Date: Tue Sep 26 07:36:43 2006
New Revision: 450063

URL: http://svn.apache.org/viewvc?view=rev&rev=450063
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/

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/cache/cache_util.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?view=diff&rev=450063&r1=450062&r2=450063
 ==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Sep 26 07:36:43 2006
@@ -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

Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?view=diff&rev=450063&r1=450062&r2=450063
 ==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Tue Sep 26 07:36:43 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.
      */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic