axios 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of axios might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.3](https://github.com/axios/axios/compare/v1.3.2...v1.3.3) (2023-02-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **formdata:** added a check to make sure the FormData class is available in the browser's global scope; ([#5545](https://github.com/axios/axios/issues/5545)) ([a6dfa72](https://github.com/axios/axios/commit/a6dfa72010db5ad52db8bd13c0f98e537e8fd05d))
9
+ * **formdata:** fixed setting NaN as Content-Length for form payload in some cases; ([#5535](https://github.com/axios/axios/issues/5535)) ([c19f7bf](https://github.com/axios/axios/commit/c19f7bf770f90ae8307f4ea3104f227056912da1))
10
+ * **headers:** fixed the filtering logic of the clear method; ([#5542](https://github.com/axios/axios/issues/5542)) ([ea87ebf](https://github.com/axios/axios/commit/ea87ebfe6d1699af072b9e7cd40faf8f14b0ab93))
11
+
12
+ ### Contributors to this release
13
+
14
+ - <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+11/-7 (#5545 #5535 #5542 )")
15
+ - <img src="https://avatars.githubusercontent.com/u/19842213?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [陈若枫](https://github.com/ruofee "+2/-2 (#5467 )")
16
+
3
17
  ## [1.3.2](https://github.com/axios/axios/compare/v1.3.1...v1.3.2) (2023-02-03)
4
18
 
5
19
 
package/dist/axios.js CHANGED
@@ -1,4 +1,4 @@
1
- // Axios v1.3.2 Copyright (c) 2023 Matt Zabriskie and contributors
1
+ // Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -1209,7 +1209,7 @@
1209
1209
 
1210
1210
  var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1211
1211
 
1212
- var FormData$1 = FormData;
1212
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1213
1213
 
1214
1214
  /**
1215
1215
  * Determine if we're running in a standard browser environment
@@ -1538,10 +1538,13 @@
1538
1538
  function isValidHeaderName(str) {
1539
1539
  return /^[-_a-zA-Z]+$/.test(str.trim());
1540
1540
  }
1541
- function matchHeaderValue(context, value, header, filter) {
1541
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1542
1542
  if (utils.isFunction(filter)) {
1543
1543
  return filter.call(this, value, header);
1544
1544
  }
1545
+ if (isHeaderNameFilter) {
1546
+ value = header;
1547
+ }
1545
1548
  if (!utils.isString(value)) return;
1546
1549
  if (utils.isString(filter)) {
1547
1550
  return value.indexOf(filter) !== -1;
@@ -1663,7 +1666,7 @@
1663
1666
  var deleted = false;
1664
1667
  while (i--) {
1665
1668
  var key = keys[i];
1666
- if (!matcher || matchHeaderValue(this, this[key], key, matcher)) {
1669
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1667
1670
  delete this[key];
1668
1671
  deleted = true;
1669
1672
  }
@@ -2423,7 +2426,7 @@
2423
2426
  return config;
2424
2427
  }
2425
2428
 
2426
- var VERSION = "1.3.2";
2429
+ var VERSION = "1.3.3";
2427
2430
 
2428
2431
  var validators$1 = {};
2429
2432