mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] fix file range length calculation being off by 1 (#1448)
* small formatting change * fix range handling new length calculation --------- Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
@@ -218,8 +218,9 @@ func serveFileRange(rw http.ResponseWriter, src io.Reader, rng string, size int6
|
||||
return
|
||||
}
|
||||
|
||||
// Determine content len
|
||||
length := end - start
|
||||
// Determine new content length
|
||||
// after slicing to given range.
|
||||
length := end - start + 1
|
||||
|
||||
if end < size-1 {
|
||||
// Range end < file end, limit the reader
|
||||
|
Reference in New Issue
Block a user