This repository was archived by the owner on Jun 29, 2021. It is now read-only.
File tree 1 file changed +9
-2
lines changed
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) {
8307
8307
// html4
8308
8308
if (!res && str) {
8309
8309
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
+ }
8310
8316
8311
8317
if (res) {
8312
8318
res = /charset=(.*)/i.exec(res.pop());
@@ -9314,7 +9320,7 @@ function fetch(url, opts) {
9314
9320
// HTTP fetch step 5.5
9315
9321
switch (request.redirect) {
9316
9322
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'));
9318
9324
finalize();
9319
9325
return;
9320
9326
case 'manual':
@@ -9353,7 +9359,8 @@ function fetch(url, opts) {
9353
9359
method: request.method,
9354
9360
body: request.body,
9355
9361
signal: request.signal,
9356
- timeout: request.timeout
9362
+ timeout: request.timeout,
9363
+ size: request.size
9357
9364
};
9358
9365
9359
9366
// HTTP-redirect fetch step 9
You can’t perform that action at this time.
0 commit comments