fix(http): honor timeout during connect without redirects#10819
fix(http): honor timeout during connect without redirects#10819jasonsaayman merged 4 commits intoaxios:v1.xfrom
Conversation
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 3/5
- There is a concrete regression risk in
lib/adapters/http.js: the new connect-phase timer can treattimeout: '0'on native transport as an immediate abort, changing prior no-timeout behavior. - Because this is a user-facing behavior change with medium severity (6/10) and high confidence (8/10), this sits in a moderate-risk range rather than a safe-to-merge baseline.
- Pay close attention to
lib/adapters/http.js- verify timeout normalization for'0'preserves the previous no-timeout semantics on native transport.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="lib/adapters/http.js">
<violation number="1" location="lib/adapters/http.js:1054">
P2: New connect-phase timer causes `timeout: '0'` on native transport to abort immediately, regressing prior no-timeout behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
9824ef4 to
432a4d8
Compare
|
Thanks, cubic found that |
@cyphercodes I have started the AI code review. It will take a few minutes to complete. |
|
Thanks for the PR @cyphercodes, This is a clean fix, and the analysis matches what I was expecting from the issue. I am happy to land it. Two small things, before I merge:
One thing I want to call out, so it is on the record: this changes time to first byte semantics on the Let me know when the PR has been updated, and I will take a look again |
|
Updated this PR to address the two follow-ups:
Local verification:
I also ran the full |
Summary
maxRedirects === 0timeout: '0'Fixes #10818
Testing
npm run test:vitest:unit -- tests/unit/adapters/http.test.js -t "TCP connect|timeout set to zero|timeout property"npx eslint lib/adapters/http.js tests/unit/adapters/http.test.js