Commit Graph

476 Commits

Author SHA1 Message Date
Jason Saayman
24c45391b6
fix: backport the fixes from the v1 branch 2026-04-10 21:17:29 +02:00
Guillaume Masclet
62610f69ad
fix: fixed performance issue in isEmptyObject() (#6484)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-04-07 21:29:38 +02:00
jasonsaayman
f53bcf6c37 chore: release 0.30.2 2026-02-18 19:15:14 +02:00
Felix Bernhard
d7ff1409c6
fix: backport DOS via __proto__ key in merge config fix to v0.x (#7388)
* backport fix

* add unit tests

* use `require()` instead of `import`
2026-02-11 08:19:32 +02:00
jasonsaayman
153f483f97 chore: preversion 2025-09-27 12:21:31 +02:00
jasonsaayman
ee548ffbf6 fix: tests failing 2025-09-27 12:21:15 +02:00
Felix Bernhard
a1b1d3f073
fix: backport maxContentLength vulnerability fix to v0.x (#7034)
* backport `maxContentLength` check for `data:` protocol urls

* backport test for `estimateDataURLDecodedBytes`

* use CommonJS export

* use `var` instead of `const`

* replace `let` with `var`

* use standard function instead of arrow function
2025-09-16 16:21:06 +02:00
Jason Saayman
b17c4dea1b chore: build latest version 2025-08-04 20:15:58 +02:00
Jason
a06ed1e2f6 chore: added pre-release artifacts 2025-03-26 19:49:40 +02:00
Gabe Mendoza
02c3c69ced
fix: backport allowAbsoluteUrls vuln fix to v0.x (#6829)
* allowAbsoluteUrls

* fix logic - copied from v1.x

* update string

* undo changes to dist/axios.js

* chore: use strict equal in lib/core/buildFullPath.js

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-03-19 12:24:25 +02:00
nishimori daisuke
0630c329f7
fix: modify log while request is aborted (#4917)
* fix: modify log while request is aborted

since the previous log 'maxContentLength size of {maxContentLength} exceeded' does not represent an acutual error, I just modified the sentence.

* fix: change error kind

* fix: fix test about stream aborted pattern

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2024-12-05 21:20:49 +02:00
jasonsaayman
7750b8c30b chore(release): prep release v0.29.0 2024-11-21 14:23:17 +02:00
qiongshusheng
4840cb2bd0
fix: regular expression denial of service issues (#6708)
* fix: Regular Expression Denial of Service (ReDoS)

* fix test failed
2024-11-15 09:29:49 +02:00
Sol Zhu
2e36cdb67f
fix(backport): fix paramsSerializer function validation (#6361)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2024-05-24 18:44:36 +02:00
Peter Williamson
3936f44b1a
Fix: omit nulls in params (#6394)
* fix: omit nulls when building params

* chore: fix prettier formatting

* fix: omit nulls when building params pt 2

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2024-05-24 18:41:46 +02:00
Sean Powell
146848f3e4
fix: backported commit #6167 and #6163 (#6402) 2024-05-24 18:38:36 +02:00
Dmitriy Mozgovoy
3021e0ddbd
[Release] v0.28.1 (#6331) 2024-03-28 19:22:44 +02:00
briwa
111811eadc
fix(backport): custom params serializer support (#6263) 2024-03-28 18:54:20 +02:00
Justin Dhillon
92a0454cff
fix(backport): Uncaught ReferenceError req is not defined at AbortSignal.onCanceled (#6307) 2024-03-21 20:31:07 +02:00
Dmitriy Mozgovoy
3b7635aefc
[Release] v0.28.0 (#6211) 2024-02-12 20:32:57 +02:00
Dmitriy Mozgovoy
27c007656d
feat(backport): added ability for paramsSerializer to handle function; (#6227) 2024-02-12 20:05:36 +02:00
lnjbr
2755df562b
fix(security): fixed CVE-2023-45857 by backporting withXSRFToken option to v0.x (#6091) 2024-01-19 18:33:41 +02:00
Willian Agostini
80b546c3f1
fix: loosing request header (#4858) (#4871)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-26 21:05:57 +02:00
wenzheng
6acb5ef8ff
feat: brower platform add data protocol. (#4814)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-08-10 21:22:01 +02:00
visortelle
871ef05112
Fix - Request ignores false, 0 and empty string as body values (#4786) 2022-06-14 21:53:09 +02:00
João Gabriel Quaresma
1504792765
Fixing content-type header repeated (#4745)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-28 11:52:50 +02:00
Victor Augusto
a11f9501b8
Fix/4737/timeout error message for http (#4738)
* Fixing timeoutErrorMessage in http calls

When timeoutErrorMessage was set this did not change anything in the error message, with this change the error message will be the configured message

* Testing timeoutErrorMessage in http calls

When timeoutErrorMessage was set this did not change anything in the error message, with this change the error message will be the configured message

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-28 11:46:33 +02:00
Dmitriy Mozgovoy
c008e57fe4
Added axios.formToJSON method; (#4735)
* Draft

* Added `formDataToJSON` helper;
Added `axios.formToJSON` method;
Added client tests;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-25 08:21:40 +02:00
Dmitriy Mozgovoy
934f390cc3
URL params serializer; (#4734)
* Refactored BuildURL helper to use URLSearchParams serializer;

* Updated typings;
Added TS test;
2022-05-25 08:16:38 +02:00
Dmitriy Mozgovoy
467025bdb7
Fixed bug #4727 : toFormData Blob issue on node>v17; (#4728)
* Fixed bug #4727;
Added node 18.x to the CI;
Added hotfix for `ERR_OSSL_EVP_UNSUPPORTED` issue with karma running on node >=17.x;
Added `cross-env` to allow running build and test scripts on Windows platforms;

* Added conditional setting of `--openssl-legacy-provider` option for node versions >=17.x;

* Refactored ssl-hotfix & test script;

* Fixed and refactored default max body length test due to ECONNRESET failure;

* Added test for converting the data uri to a Blob;
Fixed bug with parsing mime type for Blob;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-20 16:31:26 +02:00
Dimitris Halatsis
e9c9f3392b
Fix/4263/maxbodylength defaults (#4731)
* test(http): add test case for default body length in follow-redirects

* fix(http): provide proper default body length to follow-redirects

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-20 08:27:37 +02:00
Dmitriy Mozgovoy
c30252f685
Added data URL support for node.js; (#4725)
* Added data URL support for node.js;
Added missed data URL protocol for the browser environment;
Optimized JSON parsing in the default response transformer;
Refactored project structure;
Added `cause` prop for AxiosError instance that refers to the original error if it was wrapped with `AxiosError.from` method;
Added fromDataURI helper;
Added test for handling data:url as an `arraybuffer|text|stream`;

* Added throwing of 405 HTTP error if the method is not GET;
2022-05-20 08:04:36 +02:00
Dmitriy Mozgovoy
bd391247b4
Added the ability for the url-encoded-form serializer to respect the formSerializer config; (#4721)
Added test for `formSerializer` config in context of `url-encoded-form` serializer;
2022-05-17 08:26:35 +02:00
Dmitriy Mozgovoy
d60d6844b1
Fixed AxiosError stack capturing; (#4718)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:58:47 +02:00
Tom Ceuppens
9be61dc1c9
Allow webpack users to overwrite buildins (#4715)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:46:46 +02:00
Dmitriy Mozgovoy
c05ad48952
Fixed toFormData regression bug (unreleased) with Array-like objects serialization; (#4714)
Added `toURLEncodedForm` helper;
Added automatic payload serialization to `application/x-www-form-urlencoded` to have parity with `multipart/form-data`;
Added test of handling `application/x-www-form-urlencoded` body by express.js;
Updated README.md;
Added missed param in JSDoc;
Fixed hrefs in README.md;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:30:17 +02:00
毛呆
e762cf77b3
Adding Canceler parameters config and request (#4711)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:19:46 +02:00
Maxime Bargiel
24f22b2b0b
Fixing proxy beforeRedirect regression (#4708) 2022-05-16 08:05:56 +02:00
Jamie Telin
c6ec5fc867
Fixing Z_BUF_ERROR when no content (#4701)
* Fix Z_BUF_ERROR when no content

* Refactored code

* Fix undefined check

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-12 07:27:39 +02:00
Dmitriy Mozgovoy
807918bda2
Added enhanced toFormData implementation with additional options support; (#4704)
Updated default notation for arrays and objects to bracket style;
Added `multer/express.js` tests;
Updated README.md;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-11 19:30:08 +02:00
Maxime Bargiel
495d5fb133
Resolving proxy from env on redirect (#4436)
* Fixing http adapter to recompute proxy on redirect

Redirections can target different hosts or change the protocol
from http to https or vice versa. When the proxy option is
inferred from the environment, it should be recomputed when
the protocol or host changes because the proxy host can differ
or even whether to proxy or not can differ.

* Fixing proxy protocol handling

1) setProxy now changes request options protocol when using a proxy with explicit protocol.
2) As a result, selection of the correct transport can be simplified.
3) Legacy agent selection needs to be moved done accordingly. (Is 'agent' option even still used?)

* Using proxy-from-env library to handle proxy env vars

The proxy-from-env library is a popular, lightweight library that is
very easy to use and covers a few more cases, not to mention it has
extensive test coverage.

* Fixing proxy auth handling

* Adding test proving env vars are re-resolved on redirect

* Revert unnecessary change

* Fixing proxy beforeRedirect regression

* Fixing lint errors

* Revert "Fixing lint errors"

This reverts commit 2de3cabc60.

* Revert "Fixing proxy beforeRedirect regression"

This reverts commit 57befc3215.
2022-05-11 19:24:14 +02:00
Jay
de5e006142
Revert "The content type option is left to the developer (#4550)" (#4699)
This reverts commit 9579bad1d3.
2022-05-09 20:16:21 +02:00
Dmitriy Mozgovoy
356b166182
Added blob to the list of protocols supported by the browser; (#4678)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 19:27:18 +02:00
Koki Oyatsu
2f50c8249b
Adding HTTP status code for transformResponse (#4580)
* Adding HTTP status code for transformResponse

* refs #1214

* Fix wrong argument for tranformResponse

* Fix test wrong argument for tranformData

* Add test case for transformData

* Add test case for transformData (reference headers case)

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 19:25:16 +02:00
Lawliet
9579bad1d3
The content type option is left to the developer (#4550)
* The content type option is left to the developer

If the browser recognizes the fault, it can protect the developer

Although I don't think Axios itself should interfere with developers' choices

This parameter is for compatibility with historical issues

* Update xhr.js

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 19:20:33 +02:00
暴走老七
4c898f8665
don\'t need to transform arguments to array (#4544)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 19:08:57 +02:00
Dmitriy Mozgovoy
de48c5d626
Fixed race condition on immediate requests cancellation (#4261)
* Fixes #4260: fixed race condition on immediate requests cancellation

* Update http.js

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-09 18:12:29 +02:00
Landro3
544cf134f3
Interceptor clear (#4248)
* Adding interceptor clearing

* Fixing spacing

* changed clear to empty array

* fixed interceptor clear test

Co-authored-by: Andrew <Andrew@Andrews-MacBook-Pro.local>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-05 21:31:06 +02:00
Cat Scarlet
5affc9d08e
Updating trim() polyfill. According to mdn: cf607d6852/files/en-us/web/javascript/reference/global_objects/string/trim/index.md (#4072)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-04 20:25:23 +02:00
JALAL
eef2f97281
replace deprecated substr() with slice() (#4468)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-03 21:39:40 +02:00