axios 1.3.3 → 1.3.5

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.

@@ -1,4 +1,4 @@
1
- // Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
1
+ // Axios v1.3.5 Copyright (c) 2023 Matt Zabriskie and contributors
2
2
  'use strict';
3
3
 
4
4
  function bind(fn, thisArg) {
@@ -1214,6 +1214,8 @@ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams
1214
1214
 
1215
1215
  var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1216
1216
 
1217
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1218
+
1217
1219
  /**
1218
1220
  * Determine if we're running in a standard browser environment
1219
1221
  *
@@ -1268,7 +1270,7 @@ var platform = {
1268
1270
  classes: {
1269
1271
  URLSearchParams: URLSearchParams$1,
1270
1272
  FormData: FormData$1,
1271
- Blob
1273
+ Blob: Blob$1
1272
1274
  },
1273
1275
  isStandardBrowserEnv,
1274
1276
  isStandardBrowserWebWorkerEnv,
@@ -1610,9 +1612,7 @@ function parseTokens(str) {
1610
1612
  return tokens;
1611
1613
  }
1612
1614
 
1613
- function isValidHeaderName(str) {
1614
- return /^[-_a-zA-Z]+$/.test(str.trim());
1615
- }
1615
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1616
1616
 
1617
1617
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1618
1618
  if (utils.isFunction(filter)) {
@@ -2616,7 +2616,7 @@ function mergeConfig(config1, config2) {
2616
2616
  return config;
2617
2617
  }
2618
2618
 
2619
- const VERSION = "1.3.3";
2619
+ const VERSION = "1.3.5";
2620
2620
 
2621
2621
  const validators$1 = {};
2622
2622
 
@@ -2753,11 +2753,17 @@ class Axios {
2753
2753
  }, false);
2754
2754
  }
2755
2755
 
2756
- if (paramsSerializer !== undefined) {
2757
- validator.assertOptions(paramsSerializer, {
2758
- encode: validators.function,
2759
- serialize: validators.function
2760
- }, true);
2756
+ if (paramsSerializer != null) {
2757
+ if (utils.isFunction(paramsSerializer)) {
2758
+ config.paramsSerializer = {
2759
+ serialize: paramsSerializer
2760
+ };
2761
+ } else {
2762
+ validator.assertOptions(paramsSerializer, {
2763
+ encode: validators.function,
2764
+ serialize: validators.function
2765
+ }, true);
2766
+ }
2761
2767
  }
2762
2768
 
2763
2769
  // Set config.method