Skip to content

Commit

Permalink
BUGFIX: Add rawurlencode processing while building resource proxy urls
Browse files Browse the repository at this point in the history
  • Loading branch information
grebaldi committed Feb 18, 2019
1 parent c7b9a17 commit 4434062
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public function getStreamByResource(PersistentResource $resource)
$subdivideHashPathSegment = $resourceProxyConfiguration['subdivideHashPathSegment'] ?? false;
if ($subdivideHashPathSegment) {
$sha1Hash = $resource->getSha1();
$uri = $resourceProxyConfiguration['baseUri'] .'/_Resources/Persistent/' . $sha1Hash[0] . '/' . $sha1Hash[1] . '/' . $sha1Hash[2] . '/' . $sha1Hash[3] . '/' . $sha1Hash . '/' . $resource->getSha1() . '/' . $resource->getFilename();;
$uri = $resourceProxyConfiguration['baseUri'] .'/_Resources/Persistent/' . $sha1Hash[0] . '/' . $sha1Hash[1] . '/' . $sha1Hash[2] . '/' . $sha1Hash[3] . '/' . $sha1Hash . '/' . $resource->getSha1() . '/' . rawurlencode($resource->getFilename());
} else {
$uri = $resourceProxyConfiguration['baseUri'] .'/_Resources/Persistent/' . $resource->getSha1() . '/' . $resource->getFilename();
$uri = $resourceProxyConfiguration['baseUri'] .'/_Resources/Persistent/' . $resource->getSha1() . '/' . rawurlencode($resource->getFilename());
}

$response = $browser->request($uri);
Expand Down

0 comments on commit 4434062

Please sign in to comment.