This repository was archived by the owner on Jun 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -8307,6 +8307,12 @@ function convertBody(buffer, headers) {
83078307 // html4
83088308 if (!res && str) {
83098309 res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
8310+ if (!res) {
8311+ res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
8312+ if (res) {
8313+ res.pop(); // drop last quote
8314+ }
8315+ }
83108316
83118317 if (res) {
83128318 res = /charset=(.*)/i.exec(res.pop());
@@ -9314,7 +9320,7 @@ function fetch(url, opts) {
93149320 // HTTP fetch step 5.5
93159321 switch (request.redirect) {
93169322 case 'error':
9317- reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect'));
9323+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
93189324 finalize();
93199325 return;
93209326 case 'manual':
@@ -9353,7 +9359,8 @@ function fetch(url, opts) {
93539359 method: request.method,
93549360 body: request.body,
93559361 signal: request.signal,
9356- timeout: request.timeout
9362+ timeout: request.timeout,
9363+ size: request.size
93579364 };
93589365
93599366 // HTTP-redirect fetch step 9
You can’t perform that action at this time.
0 commit comments