Skip to content

Commit

Permalink
updated Download.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Shikha Mishra authored and Amol Chaudhari committed Feb 15, 2019
1 parent fc90509 commit 71a5f5d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/code/Magento/Downloadable/Helper/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,19 @@ public function setResource($resourceFile, $linkType = self::LINK_TYPE_FILE)
);
}
}

/**
* check header
*/

$this->_resourceFile = $resourceFile;
$headers = array_change_key_case(get_headers($this->_resourceFile, 1), CASE_LOWER);
if(isset($headers['location'])){
$this->_resourceFile = is_array($headers['location']) ? current($headers['location']):
$headers['location'];
}

$this->_linkType = $linkType;

return $this;
}

Expand Down

0 comments on commit 71a5f5d

Please sign in to comment.