Skip to content

docs: clarify parser timeout precision#5543

Merged
mcollina merged 1 commit into
nodejs:mainfrom
vibhor-aggr:docs/timeout-precision
Jul 11, 2026
Merged

docs: clarify parser timeout precision#5543
mcollina merged 1 commit into
nodejs:mainfrom
vibhor-aggr:docs/timeout-precision

Conversation

@vibhor-aggr

Copy link
Copy Markdown
Contributor

Summary

Closes #3798.

Documents the practical precision limits for HTTP/1.1 headersTimeout and bodyTimeout parser timeouts. Current behavior uses native timers for delays up to 1000ms and Undici's lower-overhead fast timers for larger delays, with a target resolution around 500ms, so these timeouts should not be treated as exact millisecond deadlines.

Changes

  • Add the timeout precision note to Client options documentation.
  • Add the same note to request-level Dispatcher options documentation.
  • Mirror the guidance in the related TypeScript option comments.

Verification

PATH=/mnt/TBT_DATA/nipun/work/tasks/earn-100-legal/workspace/toolchains/node/node-v24.16.0-linux-x64/bin:$PATH npm run lint
PATH=/mnt/TBT_DATA/nipun/work/tasks/earn-100-legal/workspace/toolchains/node/node-v24.16.0-linux-x64/bin:$PATH ./node_modules/.bin/tsc ./types/*.d.ts --noEmit --typeRoots ./types
git diff --check

Results: lint passed, TypeScript declaration compilation passed, and diff check passed.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.45%. Comparing base (c7c7e7f) to head (79ae73c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5543   +/-   ##
=======================================
  Coverage   93.45%   93.45%           
=======================================
  Files         110      110           
  Lines       37376    37376           
=======================================
+ Hits        34928    34930    +2     
+ Misses       2448     2446    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina
mcollina merged commit df25cc5 into nodejs:main Jul 11, 2026
36 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

headersTimeout on Agent appears to be broken since 6.20.0

3 participants