httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44579] mod_cache doesn't handle If-Range correctly
Date Wed, 12 Mar 2008 22:02:15 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44579


Ruediger Pluem <rpluem@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #7 from Ruediger Pluem <rpluem@apache.org>  2008-03-12 15:02:15 PST ---
(In reply to comment #6)
> Sorry, spoke too soon... although your patch fixes the problem when the backend
> is the local disk, it has no effect when the backend is another server
> reverse-proxied with mod_proxy.

Can you please check if the following patch fixes your problem:

Index: modules/cache/cache_storage.c
===================================================================
--- modules/cache/cache_storage.c       (Revision 636503)
+++ modules/cache/cache_storage.c       (Arbeitskopie)
@@ -283,9 +283,18 @@
                 apr_table_unset(r->headers_in, "If-Match");
                 apr_table_unset(r->headers_in, "If-Modified-Since");
                 apr_table_unset(r->headers_in, "If-None-Match");
-                apr_table_unset(r->headers_in, "If-Range");
                 apr_table_unset(r->headers_in, "If-Unmodified-Since");

+                /*
+                 * If we have an If-Range header in the original request, we
+                 * also need to remove a possible Range header as otherwise
+                 * we might get back a Range response where we shouldn't.
+                 */
+                if (apr_table_get(r->headers_in, "If-Range")) {
+                    apr_table_unset(r->headers_in, "Range");
+                }
+                apr_table_unset(r->headers_in, "If-Range");
+
                 etag = apr_table_get(h->resp_hdrs, "ETag");
                 lastmod = apr_table_get(h->resp_hdrs, "Last-Modified");


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message