Ignore range request on m3u8 rewrite

If a m3u8 is requested with a range request and gets rewritten, e.g.
adding the sessionid, the announced content-range may not correspond
to the content-length. In this cases the range request is ignored
and the full m3u8 will be returned.
This commit is contained in:
Ingo Oppermann 2023-12-06 14:30:42 +01:00
parent b43fd64dce
commit 910794d831
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -154,6 +154,10 @@ func (h *handler) handleHLSEgress(c echo.Context, ctxuser string, data map[strin
}
}
// Remove any Range request headers, because the rewrite will mess up any lengths.
req.Header.Del("Range")
req.Header.Del("If-Range")
rewrite = true
}