MDL-39688 do not set Etag when sending http ranges

This commit is contained in:
Petr Škoda 2013-05-25 09:10:24 +02:00
parent 73f560c7b2
commit f111746140
2 changed files with 15 additions and 1 deletions

View file

@ -68,6 +68,12 @@ function xsendfile($filepath) {
}
}
// Remove Etag because is is not strictly defined for byteserving,
// is it tag of this range or whole file?
if (!empty($_SERVER['HTTP_RANGE'])) {
header_remove('Etag');
}
if ($CFG->xsendfile === 'X-LIGHTTPD-send-file') {
// http://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file says 1.4 it does not support byteserving
header('Accept-Ranges: none');