Skip to content

Commit 35a874d

Browse files
chore(release): 1.3.23 [skip ci]
1 parent d63c099 commit 35a874d

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

dist/index.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2652,6 +2652,7 @@ var isURLSameOrigin = __nccwpck_require__(7446);
26522652
var transitionalDefaults = __nccwpck_require__(6511);
26532653
var AxiosError = __nccwpck_require__(9206);
26542654
var CanceledError = __nccwpck_require__(6619);
2655+
var parseProtocol = __nccwpck_require__(5200);
26552656

26562657
module.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

39063910
module.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:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wayback",
3-
"version": "1.3.22",
3+
"version": "1.3.23",
44
"private": true,
55
"license": "MIT",
66
"repository": {

0 commit comments

Comments
 (0)