From 71d32469a04883e6c46a446fbb58aace45eeed15 Mon Sep 17 00:00:00 2001 From: peter-evans <peter-evans@users.noreply.github.com> Date: Sun, 13 Sep 2020 06:08:13 +0000 Subject: [PATCH] Update distribution --- dist/index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index be85919..c34f9c4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4736,6 +4736,12 @@ function convertBody(buffer, headers) { // html4 if (!res && str) { res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str); + if (!res) { + res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str); + if (res) { + res.pop(); // drop last quote + } + } if (res) { res = /charset=(.*)/i.exec(res.pop()); @@ -5743,7 +5749,7 @@ function fetch(url, opts) { // HTTP fetch step 5.5 switch (request.redirect) { case 'error': - reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); finalize(); return; case 'manual': @@ -5782,7 +5788,8 @@ function fetch(url, opts) { method: request.method, body: request.body, signal: request.signal, - timeout: request.timeout + timeout: request.timeout, + size: request.size }; // HTTP-redirect fetch step 9