mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Fix regression introduced in #2356 (method call on non-object)
This commit is contained in:
parent
7627d95555
commit
477c3c9de6
@ -343,11 +343,14 @@ class HTTP {
|
||||
$responseHeaders['Vary'] = 'Cookie, X-Forwarded-Protocol, User-Agent, Accept';
|
||||
}
|
||||
else {
|
||||
// Grab header for checking. Unfortunately HTTPRequest uses a mistyped variant.
|
||||
$contentDisposition = $body->getHeader('Content-disposition');
|
||||
if (!$contentDisposition) $contentDisposition = $body->getHeader('Content-Disposition');
|
||||
if($body) {
|
||||
// Grab header for checking. Unfortunately HTTPRequest uses a mistyped variant.
|
||||
$contentDisposition = $body->getHeader('Content-disposition');
|
||||
if (!$contentDisposition) $contentDisposition = $body->getHeader('Content-Disposition');
|
||||
}
|
||||
|
||||
if(
|
||||
$body &&
|
||||
Director::is_https() &&
|
||||
strstr($_SERVER["HTTP_USER_AGENT"], 'MSIE')==true &&
|
||||
strstr($contentDisposition, 'attachment;')==true
|
||||
|
Loading…
Reference in New Issue
Block a user