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