Skip to content

Commit 24065db

Browse files
committed
Fix stream relaying not working on ownCloud since 81357b9
Unlike Nextcloud, ownCloud does not define a constructor for the base class OCP\AppFramework\Http\Response. Hence, it must not be called in our inherited class.
1 parent 1aa9e50 commit 24065db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Http/RelayStreamResponse.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class RelayStreamResponse extends Response implements ICallbackResponse {
2929
private $context;
3030

3131
public function __construct(string $url) {
32-
parent::__construct();
32+
// Base consturctor parent::__construct() cannot be called because it exists on Nextcloud but not on ownCloud.
33+
// Still, we need to properly initialize the headers on NC which would normally happen in the base cosntructor.
34+
$this->setHeaders([]);
3335

3436
$this->url = $url;
3537
$this->contentLength = null;

0 commit comments

Comments
 (0)