diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2023-03-22 06:56:00 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-03-22 07:35:36 +0100 |
commit | 6f640ccb48b0e3ea1a3b0c3a85dd35ff33d5ce74 (patch) | |
tree | 98dd7998b35ede1ecbe4810b6bd342b2c9de4530 /server/controllers | |
parent | 951414fc62a40aad4e7295029f3c57489bee2491 (diff) | |
download | PeerTube-6f640ccb48b0e3ea1a3b0c3a85dd35ff33d5ce74.tar.gz PeerTube-6f640ccb48b0e3ea1a3b0c3a85dd35ff33d5ce74.tar.zst PeerTube-6f640ccb48b0e3ea1a3b0c3a85dd35ff33d5ce74.zip |
fix(object-storage-proxy): set content-range
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/object-storage-proxy.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/controllers/object-storage-proxy.ts b/server/controllers/object-storage-proxy.ts index 6bff05f14..c530b57f8 100644 --- a/server/controllers/object-storage-proxy.ts +++ b/server/controllers/object-storage-proxy.ts | |||
@@ -110,6 +110,7 @@ function handleObjectStorageFailure (res: express.Response, err: Error) { | |||
110 | 110 | ||
111 | function setS3Headers (res: express.Response, s3Response: GetObjectCommandOutput) { | 111 | function setS3Headers (res: express.Response, s3Response: GetObjectCommandOutput) { |
112 | if (s3Response.$metadata.httpStatusCode === HttpStatusCode.PARTIAL_CONTENT_206) { | 112 | if (s3Response.$metadata.httpStatusCode === HttpStatusCode.PARTIAL_CONTENT_206) { |
113 | res.setHeader('Content-Range', s3Response.ContentRange) | ||
113 | res.status(HttpStatusCode.PARTIAL_CONTENT_206) | 114 | res.status(HttpStatusCode.PARTIAL_CONTENT_206) |
114 | } | 115 | } |
115 | } | 116 | } |