Merge branch 'MDL-56129-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
David Monllao 2016-11-07 11:15:58 +08:00
commit d2790f5c8f

View File

@ -2733,6 +2733,9 @@ EOD;
$protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');
if (empty($_SERVER['HTTP_RANGE'])) {
@header($protocol . ' 404 Not Found');
} else if (core_useragent::check_safari_ios_version(602) && !empty($_SERVER['HTTP_X_PLAYBACK_SESSION_ID'])) {
// Coax iOS 10 into sending the session cookie.
@header($protocol . ' 403 Forbidden');
} else {
// Must stop byteserving attempts somehow,
// this is weird but Chrome PDF viewer can be stopped only with 407!