--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/apache24/patches/bug60577.patch Wed Dec 21 07:38:10 2016 -0800
@@ -0,0 +1,80 @@
+https://bz.apache.org/bugzilla/show_bug.cgi?id=60577
+
+Index: modules/cache/cache_util.c
+===================================================================
+--- modules/cache/cache_util.c (revision 1778044)
++++ modules/cache/cache_util.c (working copy)
+@@ -31,10 +31,8 @@ extern module AP_MODULE_DECLARE_DATA cache_module;
+ * in "filter". All but the path comparisons are case-insensitive.
+ */
+ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
+- request_rec *r)
++ const apr_uri_t *url)
+ {
+- const apr_uri_t *url = &r->parsed_uri;
+-
+ /* Scheme, hostname port and local part. The filter URI and the
+ * URI we test may have the following shapes:
+ * /<path>
+@@ -114,7 +112,7 @@ static int uri_meets_conditions(const apr_uri_t *f
+ /* For HTTP caching purposes, an empty (NULL) path is equivalent to
+ * a single "/" path. RFCs 3986/2396
+ */
+- if (!r->uri) {
++ if (!url->path) {
+ if (*filter->path == '/' && pathlen == 1) {
+ return 1;
+ }
+@@ -126,7 +124,7 @@ static int uri_meets_conditions(const apr_uri_t *f
+ /* Url has met all of the filter conditions so far, determine
+ * if the paths match.
+ */
+- return !strncmp(filter->path, r->uri, pathlen);
++ return !strncmp(filter->path, url->path, pathlen);
+ }
+
+ static cache_provider_list *get_provider(request_rec *r, struct cache_enable *ent,
+@@ -172,6 +170,7 @@ cache_provider_list *cache_get_providers(request_r
+ {
+ cache_dir_conf *dconf = ap_get_module_config(r->per_dir_config, &cache_module);
+ cache_provider_list *providers = NULL;
++ const apr_uri_t *url;
+ int i;
+
+ /* per directory cache disable */
+@@ -179,11 +178,25 @@ cache_provider_list *cache_get_providers(request_r
+ return NULL;
+ }
+
++ url = &r->parsed_uri;
++ if (url->path != r->uri || (r->uri && strcmp(url->path, r->uri))) {
++ apr_uri_t *uri = apr_pcalloc(r->pool, sizeof *uri);
++ if (r->uri && apr_uri_parse(r->pool, r->uri, uri)) {
++ return NULL;
++ }
++ if (!uri->scheme) {
++ char *path = uri->path;
++ memcpy(uri, url, sizeof *uri);
++ uri->path = path;
++ }
++ url = uri;
++ }
++
+ /* global cache disable */
+ for (i = 0; i < conf->cachedisable->nelts; i++) {
+ struct cache_disable *ent =
+ (struct cache_disable *)conf->cachedisable->elts;
+- if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, r)) {
++ if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, url)) {
+ /* Stop searching now. */
+ return NULL;
+ }
+@@ -200,7 +213,7 @@ cache_provider_list *cache_get_providers(request_r
+ for (i = 0; i < conf->cacheenable->nelts; i++) {
+ struct cache_enable *ent =
+ (struct cache_enable *)conf->cacheenable->elts;
+- if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, r)) {
++ if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, url)) {
+ providers = get_provider(r, &ent[i], providers);
+ }
+ }