Switch preroll to GET

Fixes #70
This commit is contained in:
Nils Maier 2019-09-06 20:42:00 +02:00
parent 9ffc96de4d
commit 071458e262

View File

@ -259,10 +259,13 @@ export class Download extends BaseDownload {
const controller = new AbortController();
const {signal} = controller;
const res = await fetch(this.uURL.toString(), {
method: "HEAD",
method: "GET",
mode: "same-origin",
signal,
});
if (res.body) {
res.body.cancel();
}
controller.abort();
const {headers} = res;
this.prerollFinialize(headers, res);
@ -301,9 +304,12 @@ export class Download extends BaseDownload {
const controller = new AbortController();
const {signal} = controller;
const res = await fetch(rurl, {
method: "HEAD",
method: "GET",
signal,
});
if (res.body) {
res.body.cancel();
}
controller.abort();
const headers = await p;
this.prerollFinialize(