File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 },
88 "author" : " Vinay Pulim <v@pulim.com>" ,
99 "dependencies" : {
10- "axios" : " ^1.15 .0" ,
10+ "axios" : " ^1.16 .0" ,
1111 "axios-ntlm" : " ^1.4.6" ,
1212 "debug" : " ^4.4.3" ,
1313 "follow-redirects" : " ^1.15.11" ,
5858 "express" : " ^5.1.0" ,
5959 "finalhandler" : " ^2.1.0" ,
6060 "glob" : " ^13.0.0" ,
61- "mocha" : " ^11.7.4 " ,
61+ "mocha" : " ^11.7.5 " ,
6262 "nyc" : " ^18.0.0" ,
6363 "prettier" : " ^3.6.2" ,
6464 "readable-stream" : " ^4.7.0" ,
Original file line number Diff line number Diff line change @@ -248,10 +248,12 @@ export class HttpClient implements IHttpClient {
248248 } ;
249249
250250 if ( _this . options . parseReponseAttachments ) {
251- const isMultipartResp = res . headers [ 'content-type' ] && res . headers [ 'content-type' ] . toLowerCase ( ) . indexOf ( 'multipart/related' ) > - 1 ;
251+ const contentTypeHeader = res . headers [ 'content-type' ] ;
252+ const contentType = typeof contentTypeHeader === 'string' ? contentTypeHeader : Array . isArray ( contentTypeHeader ) ? contentTypeHeader [ 0 ] : '' ;
253+ const isMultipartResp = contentType . toLowerCase ( ) . indexOf ( 'multipart/related' ) > - 1 ;
252254 if ( isMultipartResp ) {
253255 let boundary ;
254- const parsedContentType = new MIMEType ( res . headers [ 'content-type' ] ) ;
256+ const parsedContentType = new MIMEType ( contentType ) ;
255257 if ( parsedContentType ) {
256258 boundary = parsedContentType . parameters . get ( 'boundary' ) ;
257259 }
You can’t perform that action at this time.
0 commit comments