Skip to content

Comments

fix(deduplicate): do not deduplicate non-safe methods by default#4818

Merged
mcollina merged 1 commit intomainfrom
fix/deduplicate-non-safe-methods-4817
Feb 13, 2026
Merged

fix(deduplicate): do not deduplicate non-safe methods by default#4818
mcollina merged 1 commit intomainfrom
fix/deduplicate-non-safe-methods-4817

Conversation

@mcollina
Copy link
Member

@mcollina mcollina commented Feb 7, 2026

Summary

  • fix deduplicate interceptor to gate deduplication with methods.includes(opts.method)
  • prevent non-safe methods (like POST) from entering deduplication when using default options
  • add a regression test that verifies concurrent POST requests are not deduplicated by default

Fixes #4817.

Testing

  • npx borp -p "test/interceptors/deduplicate.js"

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.25%. Comparing base (b3326b5) to head (32c8aca).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4818   +/-   ##
=======================================
  Coverage   93.25%   93.25%           
=======================================
  Files         109      109           
  Lines       34153    34151    -2     
=======================================
  Hits        31848    31848           
+ Misses       2305     2303    -2     

☔ View full report in Codecov by Sentry.
📢 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 merged commit 9b78a44 into main Feb 13, 2026
36 of 37 checks passed
@mcollina mcollina deleted the fix/deduplicate-non-safe-methods-4817 branch February 13, 2026 08:59
@github-actions github-actions bot mentioned this pull request Feb 13, 2026
slagiewka pushed a commit to slagiewka/undici that referenced this pull request Feb 14, 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.

Deduplicate interceptor deduplicates non-safe HTTP methods

3 participants