Skip to content

Commit f1867c9

Browse files
author
Shikha Mishra
authored
updated Download.php
1 parent 01a5fce commit f1867c9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

app/code/Magento/Downloadable/Helper/Download.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,19 @@ public function setResource($resourceFile, $linkType = self::LINK_TYPE_FILE)
253253
);
254254
}
255255
}
256+
257+
/**
258+
* check header
259+
*/
256260

257261
$this->_resourceFile = $resourceFile;
262+
$headers = array_change_key_case(get_headers($this->_resourceFile, 1), CASE_LOWER);
263+
if(isset($headers['location'])){
264+
$this->_resourceFile = is_array($headers['location']) ? current($headers['location']):
265+
$headers['location'];
266+
}
267+
258268
$this->_linkType = $linkType;
259-
260269
return $this;
261270
}
262271

0 commit comments

Comments
 (0)