Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(proxy): reaching s3 storage behind some http proxy
Signed-off-by: Maxime Besson <[email protected]>
  • Loading branch information
maxbes authored and backportbot[bot] committed Sep 1, 2021
commit 956bccc1c0de8549cfd33c83a70a358daad8b4dd
8 changes: 4 additions & 4 deletions lib/private/Files/ObjectStore/S3ObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ abstract protected function getConnection();
*/
public function readObject($urn) {
return SeekableHttpStream::open(function ($range) use ($urn) {
$connection = $this->getConnection();
$command = $connection->getCommand('GetObject', [
$command = $this->getConnection()->getCommand('GetObject', [
'Bucket' => $this->bucket,
'Key' => $urn,
'Range' => 'bytes=' . $range,
Expand All @@ -70,8 +69,9 @@ public function readObject($urn) {
],
];

if ($connection->getProxy()) {
$opts['http']['proxy'] = $connection->getProxy();
if ($this->getProxy()) {
$opts['http']['proxy'] = $this->getProxy();
$opts['http']['request_fulluri'] = true;
}

$context = stream_context_create($opts);
Expand Down