forked from Kieran/void.cat
Range fix
This commit is contained in:
parent
1c370dfd24
commit
28910368e3
@ -7,7 +7,7 @@ public sealed record RangeRequest(long? TotalSize, long? Start, long? End)
|
|||||||
public string OriginalString { get; private init; }
|
public string OriginalString { get; private init; }
|
||||||
|
|
||||||
public long? Size
|
public long? Size
|
||||||
=> (Start.HasValue ? (End ?? Math.Min(TotalSize!.Value, Start.Value + DefaultBufferSize)) - Start.Value : End) + 1L;
|
=> (Start.HasValue ? (End ?? Math.Min(TotalSize!.Value - 1, Start.Value + DefaultBufferSize)) - Start.Value : End) + 1L;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return Content-Range header content for this range
|
/// Return Content-Range header content for this range
|
||||||
|
Loading…
Reference in New Issue
Block a user