41a6c3
--- a/modules/cache/cache_storage.c	2013/09/14 13:30:39	1523234
41a6c3
+++ b/modules/cache/cache_storage.c	2013/09/14 13:32:25	1523235
41a6c3
@@ -713,7 +713,9 @@
41a6c3
                 || APR_SUCCESS
41a6c3
                         != cache_canonicalise_key(r, r->pool, location,
41a6c3
                                 &location_uri, &location_key)
41a6c3
-                || strcmp(r->parsed_uri.hostname, location_uri.hostname)) {
41a6c3
+                || !(r->parsed_uri.hostname && location_uri.hostname
41a6c3
+                        && !strcmp(r->parsed_uri.hostname,
41a6c3
+                                location_uri.hostname))) {
41a6c3
             location_key = NULL;
41a6c3
         }
41a6c3
     }
41a6c3
@@ -726,8 +728,9 @@
41a6c3
                 || APR_SUCCESS
41a6c3
                         != cache_canonicalise_key(r, r->pool, content_location,
41a6c3
                                 &content_location_uri, &content_location_key)
41a6c3
-                || strcmp(r->parsed_uri.hostname,
41a6c3
-                        content_location_uri.hostname)) {
41a6c3
+                || !(r->parsed_uri.hostname && content_location_uri.hostname
41a6c3
+                        && !strcmp(r->parsed_uri.hostname,
41a6c3
+                                content_location_uri.hostname))) {
41a6c3
             content_location_key = NULL;
41a6c3
         }
41a6c3
     }