Skip to content

Commit

Permalink
Merge pull request #1104 from jembi/OHM-1039-send-content-range-header
Browse files Browse the repository at this point in the history
send back the content-range header
  • Loading branch information
Martin Brocker authored Nov 17, 2020
2 parents ecb22f1 + 6a804c7 commit 2b2e578
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/api/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ export async function getTransactionBodyById (ctx, transactionId, bodyId) {
ctx.status = rangeHeader ? 206 : 200
ctx.set('accept-ranges', 'bytes')
ctx.set('content-type', 'application/text')
ctx.set('access-control-expose-headers', 'content-range, content-length, content-type')
if (rangeHeader) {
ctx.set('content-range', `bytes ${range.start}-${range.end}/${body.fileDetails.length}`)
ctx.set('content-length', Math.min((range.end - range.start) + 1, body.fileDetails.length))
Expand Down

0 comments on commit 2b2e578

Please sign in to comment.