Skip to content
Snippets Groups Projects
Commit 50a1f2a1 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #2427

Closes #2427

Merge request studip/studip!1706
parent ced11072
No related branches found
No related tags found
No related merge requests found
......@@ -387,7 +387,7 @@ class OERMaterial extends SimpleORMap
return false;
}
$url = $this->getDownloadUrl();
$headers = get_headers($url, true);
$headers = get_headers($url, true, get_default_http_stream_context($url));
if ($headers['Content-Disposition']
&& substr($headers['Content-Disposition'], 0, strlen('attachment')) === 'attachment') {
//in this case the server forces to download the document and we cannot display it in an iframe:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment