|
@@ -729,6 +729,8 @@ namespace FNZCM.ConHost.Ver2
|
|
|
{
|
|
|
fs = File.OpenRead(realPath);
|
|
|
|
|
|
+ context.Response.Headers.Add("Accept-Ranges", "bytes");
|
|
|
+
|
|
|
if (range is { Length: > 0 })
|
|
|
{
|
|
|
var rngParts = range[0].Split(new[] { "bytes=", "-" }, StringSplitOptions.RemoveEmptyEntries);
|
|
@@ -736,7 +738,6 @@ namespace FNZCM.ConHost.Ver2
|
|
|
{
|
|
|
fs.Position = start;
|
|
|
context.Response.StatusCode = 206;
|
|
|
- context.Response.Headers.Add("Accept-Ranges", "bytes");
|
|
|
context.Response.Headers.Add("Content-Range", $"bytes {start}-{fs.Length - 1}/{fs.Length}");
|
|
|
context.Response.ContentLength64 = fs.Length - start;
|
|
|
fs.CopyTo(context.Response.OutputStream);
|