@@ -2652,6 +2652,7 @@ var isURLSameOrigin = __nccwpck_require__(7446);
26522652var transitionalDefaults = __nccwpck_require__ ( 6511 ) ;
26532653var AxiosError = __nccwpck_require__ ( 9206 ) ;
26542654var CanceledError = __nccwpck_require__ ( 6619 ) ;
2655+ var parseProtocol = __nccwpck_require__ ( 5200 ) ;
26552656
26562657module . exports = function xhrAdapter ( config ) {
26572658 return new Promise ( function dispatchXhrRequest ( resolve , reject ) {
@@ -2669,6 +2670,10 @@ module.exports = function xhrAdapter(config) {
26692670 }
26702671 }
26712672
2673+ if ( utils . isFormData ( requestData ) && utils . isStandardBrowserEnv ( ) ) {
2674+ delete requestHeaders [ 'Content-Type' ] ; // Let the browser set it
2675+ }
2676+
26722677 var request = new XMLHttpRequest ( ) ;
26732678
26742679 // HTTP basic authentication
@@ -2845,8 +2850,7 @@ module.exports = function xhrAdapter(config) {
28452850 requestData = null ;
28462851 }
28472852
2848- var tokens = fullPath . split ( ':' , 2 ) ;
2849- var protocol = tokens . length > 1 && tokens [ 0 ] ;
2853+ var protocol = parseProtocol ( fullPath ) ;
28502854
28512855 if ( protocol && [ 'http' , 'https' , 'file' ] . indexOf ( protocol ) === - 1 ) {
28522856 reject ( new AxiosError ( 'Unsupported protocol ' + protocol + ':' , AxiosError . ERR_BAD_REQUEST , config ) ) ;
@@ -3904,7 +3908,7 @@ module.exports = {
39043908/***/ ( ( module ) => {
39053909
39063910module . exports = {
3907- "version" : "0.27.1 "
3911+ "version" : "0.27.2 "
39083912} ;
39093913
39103914/***/ } ) ,
@@ -4287,6 +4291,20 @@ module.exports = function parseHeaders(headers) {
42874291} ;
42884292
42894293
4294+ /***/ } ) ,
4295+
4296+ /***/ 5200 :
4297+ /***/ ( ( module ) => {
4298+
4299+ "use strict" ;
4300+
4301+
4302+ module . exports = function parseProtocol ( url ) {
4303+ var match = / ^ ( [ - + \w ] { 1 , 25 } ) ( : ? \/ \/ | : ) / . exec ( url ) ;
4304+ return match && match [ 1 ] || '' ;
4305+ } ;
4306+
4307+
42904308/***/ } ) ,
42914309
42924310/***/ 5432 :
0 commit comments