* Restore the original request headers if the cached resource was stale, as they
may be needed by further output filters like the byterange filter to make the
correct decisions.
PR: 44579
* Do not do Range requests if we use our own conditionals for validating
a cache entity: If we get 304 the Range does not matter and otherwise the
entity changed and we want to have the complete entity.
PR: 44579
Submitted by: rpluem
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@660584
13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.2.9
+ *) mod_cache: Handle If-Range correctly if the cached resource was stale.
+ PR 44579 [Ruediger Pluem]
+
*) mod_proxy: Do not try a direct connection if the connection via a
remote proxy failed before and the request has a request body.
[Ruediger Pluem]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_cache: Handle If-Range correctly if the cached resource was stale.
- PR 44579
- Trunk version of patch:
- http://svn.apache.org/viewvc?rev=636386&view=rev
- http://svn.apache.org/viewvc?rev=636653&view=rev
- Backport version for 2.2.x of patch:
- Trunk version of patch works
- +1: rpluem, niq, jim
-
* core: Do not allow Options ALL if not all options are allowed to be
overwritten. PR 44262
Trunk version of patch:
apr_table_unset(r->headers_in, "If-Range");
apr_table_unset(r->headers_in, "If-Unmodified-Since");
+ /*
+ * Do not do Range requests with our own conditionals: If
+ * we get 304 the Range does not matter and otherwise the
+ * entity changed and we want to have the complete entity
+ */
+ apr_table_unset(r->headers_in, "Range");
+
etag = apr_table_get(h->resp_hdrs, "ETag");
lastmod = apr_table_get(h->resp_hdrs, "Last-Modified");
cache->provider->remove_entity(cache->stale_handle);
/* Treat the request as if it wasn't conditional. */
cache->stale_handle = NULL;
+ /*
+ * Restore the original request headers as they may be needed
+ * by further output filters like the byterange filter to make
+ * the correct decisions.
+ */
+ r->headers_in = cache->stale_headers;
}
}