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 19:11:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44579





--- Comment #6 from moog <moog@sysdev.oucs.ox.ac.uk>  2008-03-12 12:11:43 PST ---
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.

GET /proxied/date.txt HTTP/1.1
Host: 127.0.0.1
Range: bytes=10-20
If-Range: Wed, 12 Mar 2008 18:48:57 GMT

causes Apache to make the following request to the backend:

GET /store/date.txt HTTP/1.1
Host: [backend]
Range: bytes=10-20
If-None-Match: "3e61762-1d-44841e3b1d840"
If-Modified-Since: Wed, 12 Mar 2008 18:48:57 GMT
X-Forwarded-For: 127.0.0.1
X-Forwarded-Host: 127.0.0.1
X-Forwarded-Server: box
Connection: Keep-Alive

and since the backend has updated content, it delivers the new content, but
only part of it, because that's what it was asked for:

HTTP/1.1 206 Partial Content
Date: Wed, 12 Mar 2008 18:51:00 GMT
Server: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c WebAuth/3.5.3
Last-Modified: Wed, 12 Mar 2008 18:49:59 GMT
ETag: "3e61762-1d-44841e763e3c0"
Accept-Ranges: bytes
Content-Length: 11
Content-Range: bytes 10-20/29
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset=ISO-8859-1

 18:49:59 G

Then Apache delivers this partial content back to the client, not respecting
the If-Range request:

HTTP/1.1 206 Partial Content
Date: Wed, 12 Mar 2008 18:51:00 GMT
Server: Apache/2.2.3 (Debian) mod_ssl/2.2.3 OpenSSL/0.9.8c WebAuth/3.5.3
Last-Modified: Wed, 12 Mar 2008 18:49:59 GMT
ETag: "3e61762-1d-44841e763e3c0"
Accept-Ranges: bytes
Content-Length: 11
Content-Range: bytes 10-20/29
Content-Type: text/plain; charset=ISO-8859-1

 18:49:59 G

Perhaps when a client makes an If-Range request, Apache too needs to make an
If-Range request to the backend, rather than an If-Modified-Since, so that it
will retrieve the full content when it's needed.


-- 
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