Skip to content

Commit

Permalink
Update node-fetch cached license
Browse files Browse the repository at this point in the history
  • Loading branch information
jclem committed Nov 17, 2020
1 parent bdd2daf commit 5c19504
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .licenses/npm/node-fetch.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3753,6 +3753,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 @@ -4760,7 +4766,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 @@ -4799,7 +4805,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

0 comments on commit 5c19504

Please sign in to comment.