2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-27 14:47:43 +03:00
Commit Graph

310 Commits

Author SHA1 Message Date
Subhan Kumar Rai d7e6065346 fix(http2): Use port 443 for HTTPS connections by default. (#7256)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2025-12-19 02:22:38 +02:00
KT0803 8092aee724 chore: remove TODO comment and dead code from http adapter error handler (#7229)
Remove commented-out code marked with @todo remove in the request error
handler. The code was already disabled and no longer needed.
2025-11-18 08:40:53 +02:00
Justin Dhillon d5b76d4af7 style: get rid of redundency in imports (#6315)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-12 21:11:56 +02:00
Gabriel Quaresma 6ef867e684 fix: unclear error message is thrown when specifying an empty proxy authorization (#6314)
* fix: add AxiosError to Invalid proxy authorization

* fix: minor update

* Update test/unit/adapters/http.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: remove redundant check

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: code style

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: style

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: correct assert

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: João Gabriel Quaresma de Almeida <joaoGabriel55>
Co-authored-by: Jay <jasonsaayman@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 21:04:39 +02:00
Dmitriy Mozgovoy 8d372335f5 fix(http): fix 'socket hang up' bug for keep-alive requests when using timeouts; (#7206) 2025-11-04 01:08:35 +02:00
Dmitriy Mozgovoy 12c314b603 perf(http): fix early loop exit; (#7202) 2025-11-04 00:43:10 +02:00
Kasper Isager Dalsgarð 0588880ac7 fix(http): use default export for http2 module to support stubs; (#7196) 2025-10-29 21:10:29 +02:00
Dmitriy Mozgovoy bcd5581d20 fix(http): fixed a regression that caused the data stream to be interrupted for responses with non-OK HTTP statuses; (#7193) 2025-10-28 20:44:08 +02:00
Dmitriy Mozgovoy d000fbfd07 fix(http2): fix possible race condition when handling http2 stream on almost timed out session by improving timeout out algorithm; (#7186) 2025-10-27 00:46:40 +02:00
Dmitriy Mozgovoy d676df7722 feat(http): add HTTP2 support; (#7150) 2025-10-19 15:06:36 +03:00
Jane Wangari 015faeca9f fix(fetch): prevent TypeError when config.env is undefined (#7155) 2025-10-16 18:20:26 +03:00
Aviraj2929 6e0c8e76a7 docs: add jsdoc to adapters (#7134)
* add contributors and documentation

* docs(adapters): add JSDoc for adapters module

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-10-12 16:38:54 +02:00
Dmitriy Mozgovoy cf78825e12 fix(fetch): use current global fetch instead of cached one when env fetch is not specified to keep MSW support; (#7030) 2025-09-13 23:24:16 +03:00
Ameer Assadi 945435fc51 fix(node): enforce maxContentLength for data: URLs (#7011)
* fix(node): enforce maxContentLength for data: URLs (pre-decode size check)- CVE-2025-58754

* feat(utils): add estimateDataURLDecodedBytes helper and fix duplicate condition in base64 padding check

* feat: add estimateDataURLDecodedBytes helper with tests
2025-09-10 15:08:43 +02:00
Dmitriy Mozgovoy c959ff2901 feat(fetch): add fetch, Request, Response env config variables for the adapter; (#7003)
* feat(fetch): add fetch, Request, Response env config variables for the adapter;

* feat(fetch): fixed design issue for environments without fetch API globals;
2025-08-30 22:02:24 +03:00
khani 78b290c57c feat(adapter): surface low‑level network error details; attach original error via cause (#6982)
* feat(adapter): surface low‑level network error details; attach original error via `cause`

Node http adapter:
- Promote low-level `err.code` to `AxiosError.code`, prefixing message (e.g. `ECONNREFUSED – …`)
- Keep original error on standard `Error.cause`

XHR adapter:
- Preserve browser `ProgressEvent` on `error.event`
- Use event message when available

Tests:
- Add Node ESM tests under `test/unit/adapters` to assert `code` and `cause` behavior

Types:
- Ensure `AxiosError.cause?: unknown` and `event?: ProgressEvent` are present

* fix(adapter): use fs instead of fs/promises for sync file read in tests to fix GitHub Actions
2025-07-30 09:57:27 +02:00
Uhyeon Park 0f50af8e07 fix(adapter): pass fetchOptions to fetch function (#6883)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-06-01 18:57:50 +02:00
Dmitriy Mozgovoy dfe8411c9a fix(fetch): fixed ERR_NETWORK mapping for Safari browsers; (#6767) 2025-04-15 01:52:53 +03:00
Fasoro-Joseph Alexander fb8eec214c fix(http-adapter): add allowAbsoluteUrls to path building (#6810)
Co-authored-by: alex-paystack <alex@paystack.com>
2025-03-07 09:30:30 +02:00
Pavan Welihinda 12b32957f1 fix(http): fixed proxy-from-env module import (#5222)
Co-authored-by: Pavan Welihinda <pavan@babyjourney.se>
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-11-07 21:12:02 +02:00
Henco Appel 6841d8d18d fix(http): add support for File objects as payload in http adapter (#6588) (#6605)
Co-authored-by: Hendrik Appel <happel@europe.altair.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-10-13 20:43:40 +03:00
Taylor Flatt cc3217a612 fix: updated stream aborted error message to be more clear (#6615) 2024-09-28 13:04:22 +02:00
Rishi556 364993f0d8 fix(http): fixed support for IPv6 literal strings in url (#5731) 2024-09-01 00:47:25 +03:00
Dmitriy Mozgovoy d1980854fe fix(fetch): fix stream handling in Safari by fallback to using a stream reader instead of an async iterator; (#6584) 2024-08-31 22:14:23 +03:00
Dmitriy Mozgovoy df9889b83c fix(fetch): optimize signals composing logic; (#6582) 2024-08-30 21:26:12 +03:00
Jacques Germishuys 085f56861a fix(fetch): fix content length calculation for FormData payload; (#6524) 2024-08-25 20:38:10 +03:00
Antonin Bas 7004707c41 fix(adapter): fix undefined reference to hasBrowserEnv (#6572) 2024-08-23 15:23:14 +03:00
Hans Otto Wirtz 550d885eb9 fix(fetch): fix credentials handling in Cloudflare workers (#6533)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-08-20 15:23:32 +03:00
Lev Pachmanov 6b6b605eaf fix(sec): CVE-2024-39338 (#6539) (#6543)
* fix(sec): cve-2024-39338 (#6539)

* fix(sec): fix test
2024-08-13 20:43:05 +02:00
Dmitriy Mozgovoy e3c76fc9bd fix(adapter): fix progress event emitting; (#6518) 2024-08-01 16:59:58 +03:00
prianYu 85d4d0ea0a fix(fetch): fix withCredentials request config (#6505) 2024-08-01 15:26:06 +03:00
Valerii Sidorenko 8966ee7ea6 fix(xhr): return original config on errors from XHR adapter (#6515) 2024-07-30 21:38:22 +03:00
Dmitriy Mozgovoy 4f79aef81b fix(fetch): enhance fetch API detection; (#6413) 2024-05-21 17:20:15 +03:00
Dmitriy Mozgovoy 733f15fe5b fix(fetch): fixed ReferenceError issue when TextEncoder is not available in the environment; (#6410) 2024-05-20 16:15:15 +03:00
Dmitriy Mozgovoy e62099bc8b fix(fetch): fixed a possible memory leak in the AbortController for the stream response if the ReadableStream is not supported; (#6406) 2024-05-19 23:04:40 +03:00
Dmitriy Mozgovoy 870e0a76f6 fix(fetch): fix headers getting from a stream response; (#6401) 2024-05-19 01:40:21 +03:00
Dmitriy Mozgovoy 95a3e8e346 fix(fetch): fix & optimize progress capturing for cases when the request data has a nullish value or zero data length (#6400) 2024-05-18 18:16:42 +03:00
Dmitriy Mozgovoy ad3174a351 fix(fetch): capitalize HTTP method names; (#6395) 2024-05-18 18:01:01 +03:00
Dmitriy Mozgovoy bb5f9a5ab7 fix(fetch): treat fetch-related TypeError as an AxiosError.ERR_NETWORK error; (#6380) 2024-05-07 21:26:46 +03:00
Dmitriy Mozgovoy d1d359da34 fix(fetch): fix cases when ReadableStream or Response.body are not available; (#6377) 2024-05-03 20:22:11 +03:00
Dmitriy Mozgovoy a3ff99b59d feat(adapter): add fetch adapter; (#6371) 2024-04-28 22:33:49 +03:00
Aditya Mogili 7320430aef fix(import): use named export for EventEmitter;
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-03-15 18:05:34 +02:00
Zao Soula a1938ff073 fix: fixed missed dispatchBeforeRedirect argument (#5778)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-01-25 00:57:06 +02:00
Dmitriy Mozgovoy f4f2b039dd fix(dns): fixed lookup error handling; (#6175) 2024-01-05 01:48:07 +02:00
Dmitriy Mozgovoy cff996779b feat(withXSRFToken): added withXSRFToken option as a workaround to achieve the old withCredentials behavior; (#6046) 2023-11-14 15:38:25 +02:00
Dmitriy Mozgovoy dd465ab22b fix(formdata): fixed content-type header normalization for non-standard browser environments; (#6056) 2023-11-07 22:21:19 +02:00
Dmitriy Mozgovoy 3dc8369e50 fix(platform): fixed emulated browser detection in node.js environment; (#6055) 2023-11-07 22:16:15 +02:00
Valentin Panov 96ee232bd3 fix(CSRF): fixed CSRF vulnerability CVE-2023-45857 (#6028)
Co-authored-by: DigitalBrainJS <robotshara@gmail.com>
2023-10-26 22:54:06 +03:00
Dmitriy Mozgovoy 7d45ab2e2a chore(tests): fixed tests to pass in node v19 and v20 with keep-alive enabled; (#6021) 2023-10-22 18:20:44 +03:00
Dmitriy Mozgovoy 5aaff532a6 fix(dns): fixed lookup function decorator to work properly in node v20; (#6011) 2023-10-22 17:12:33 +03:00