Skip to content

Commit

Permalink
fix: run npm audit fix (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Plabick committed Jun 1, 2021
1 parent 243f815 commit dd05465
Show file tree
Hide file tree
Showing 2 changed files with 953 additions and 59 deletions.
11 changes: 9 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3248,6 +3248,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());
Expand Down Expand Up @@ -4255,7 +4261,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':
Expand Down Expand Up @@ -4294,7 +4300,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
Expand Down
Loading

0 comments on commit dd05465

Please sign in to comment.