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 @@ -3770,6 +3770,12 @@ function convertBody(buffer, headers) {
3770
3770
// html4
3771
3771
if ( ! res && str ) {
3772
3772
res = / < m e t a [ \s ] + ?h t t p - e q u i v = ( [ ' " ] ) c o n t e n t - t y p e \1[ \s ] + ?c o n t e n t = ( [ ' " ] ) ( .+ ?) \2/ i. exec ( str ) ;
3773
+ if ( ! res ) {
3774
+ res = / < m e t a [ \s ] + ?c o n t e n t = ( [ ' " ] ) ( .+ ?) \1[ \s ] + ?h t t p - e q u i v = ( [ ' " ] ) c o n t e n t - t y p e \3/ i. exec ( str ) ;
3775
+ if ( res ) {
3776
+ res . pop ( ) ; // drop last quote
3777
+ }
3778
+ }
3773
3779
3774
3780
if ( res ) {
3775
3781
res = / c h a r s e t = ( .* ) / i. exec ( res . pop ( ) ) ;
@@ -4777,7 +4783,7 @@ function fetch(url, opts) {
4777
4783
// HTTP fetch step 5.5
4778
4784
switch ( request . redirect ) {
4779
4785
case 'error' :
4780
- reject ( new FetchError ( `redirect mode is set to error: ${ request . url } ` , 'no-redirect' ) ) ;
4786
+ reject ( new FetchError ( `uri requested responds with a redirect, redirect mode is set to error: ${ request . url } ` , 'no-redirect' ) ) ;
4781
4787
finalize ( ) ;
4782
4788
return ;
4783
4789
case 'manual' :
@@ -4816,7 +4822,8 @@ function fetch(url, opts) {
4816
4822
method : request . method ,
4817
4823
body : request . body ,
4818
4824
signal : request . signal ,
4819
- timeout : request . timeout
4825
+ timeout : request . timeout ,
4826
+ size : request . size
4820
4827
} ;
4821
4828
4822
4829
// HTTP-redirect fetch step 9
You can’t perform that action at this time.
0 commit comments