Repository navigation
fix(deduplicate): do not deduplicate requests with a body - #6240
Merged
Merged
Conversation
Signed-off-by: arshiya tabasum <arshi@bugqore.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6240 +/- ##
==========================================
+ Coverage 91.71% 91.72% +0.01%
==========================================
Files 113 113
Lines 44835 44842 +7
==========================================
+ Hits 41121 41133 +12
+ Misses 3714 3709 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mcollina
approved these changes
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This relates to...
N/A
Rationale
The
deduplicateinterceptor builds its key from the origin, method, path and headers, but not the request body. undici allows a body onGET, and search APIs such as Elasticsearch's_searchrely on it, so two concurrent requests to the same URL with different bodies were merged. Only the first body reached the server, and the second caller got the first caller's response:In a service that shares one dispatcher across users, one user can receive another user's results. A body can be a stream and can't be compared cheaply, so requests that carry a body now skip deduplication and are sent as usual.
Changes
Features
N/A
Bug Fixes
interceptors.deduplicate()no longer merges requests that carry a bodyInterceptors.mdtest/interceptors/deduplicate.js. It fails onmain(1 origin hit instead of 2) and passes with the fixBreaking Changes and Deprecations
N/A
Status