mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
api/stream: don't override content-length for hls transform
This commit is contained in:
parent
6b1eadbe09
commit
53e6085095
1 changed files with 5 additions and 2 deletions
|
@ -96,8 +96,11 @@ async function handleGenericStream(streamInfo, res) {
|
||||||
res.status(req.statusCode);
|
res.status(req.statusCode);
|
||||||
req.body.on('error', () => {});
|
req.body.on('error', () => {});
|
||||||
|
|
||||||
for (const [ name, value ] of Object.entries(req.headers))
|
for (const [ name, value ] of Object.entries(req.headers)) {
|
||||||
res.setHeader(name, value)
|
if (!isHlsRequest(req) || name.toLowerCase() !== 'content-length') {
|
||||||
|
res.setHeader(name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (req.statusCode < 200 || req.statusCode > 299)
|
if (req.statusCode < 200 || req.statusCode > 299)
|
||||||
return cleanup();
|
return cleanup();
|
||||||
|
|
Loading…
Reference in a new issue