Remove file extension check (#801)

This commit is contained in:
Calvin Montgomery 2019-04-07 16:32:58 -07:00
parent 5493a81611
commit a3a2daff4c
4 changed files with 66 additions and 64 deletions

View file

@ -174,11 +174,10 @@ function testUrl(url, cb, params = { redirCount: 0, cookie: '' }) {
}
if (!/^audio|^video/.test(res.headers["content-type"])) {
return cb("Expected a content-type starting with 'audio' or 'video', but " +
"got '" + res.headers["content-type"] + "'. Only direct links " +
"to video and audio files are accepted, and the website hosting " +
"the file must be configured to send the correct MIME type. " +
"See https://git.io/vrE75 for details.");
cb("Could not detect a supported audio/video type. See " +
"https://git.io/fjtOK for a list of supported providers. " +
"(Content-Type was: '" + res.headers["content-type"] + "')");
return;
}
cb();