2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Releasing v0.27.2

This commit is contained in:
Jay
2022-04-27 11:58:12 +02:00
parent b9e9fb4fa0
commit bc733fec78
10 changed files with 45 additions and 13 deletions
+26 -3
View File
@@ -1,3 +1,4 @@
/* axios v0.27.2 | (c) 2022 by Matt Zabriskie */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
@@ -127,6 +128,7 @@ var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ ".
var transitionalDefaults = __webpack_require__(/*! ../defaults/transitional */ "./lib/defaults/transitional.js");
var AxiosError = __webpack_require__(/*! ../core/AxiosError */ "./lib/core/AxiosError.js");
var CanceledError = __webpack_require__(/*! ../cancel/CanceledError */ "./lib/cancel/CanceledError.js");
var parseProtocol = __webpack_require__(/*! ../helpers/parseProtocol */ "./lib/helpers/parseProtocol.js");
module.exports = function xhrAdapter(config) {
return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -144,6 +146,10 @@ module.exports = function xhrAdapter(config) {
}
}
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
delete requestHeaders['Content-Type']; // Let the browser set it
}
var request = new XMLHttpRequest();
// HTTP basic authentication
@@ -320,8 +326,7 @@ module.exports = function xhrAdapter(config) {
requestData = null;
}
var tokens = fullPath.split(':', 2);
var protocol = tokens.length > 1 && tokens[0];
var protocol = parseProtocol(fullPath);
if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
@@ -1430,7 +1435,7 @@ module.exports = {
/***/ (function(module, exports) {
module.exports = {
"version": "0.27.1"
"version": "0.27.2"
};
/***/ }),
@@ -1862,6 +1867,24 @@ module.exports = function parseHeaders(headers) {
};
/***/ }),
/***/ "./lib/helpers/parseProtocol.js":
/*!**************************************!*\
!*** ./lib/helpers/parseProtocol.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function parseProtocol(url) {
var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
return match && match[1] || '';
};
/***/ }),
/***/ "./lib/helpers/spread.js":
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long