Skip to content

Commit 5890c7b

Browse files
committed
fix(deduplicate): stream response chunks to waiting handlers
1 parent fbda3c1 commit 5890c7b

5 files changed

Lines changed: 444 additions & 67 deletions

File tree

docs/docs/api/Dispatcher.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,7 @@ The `deduplicate` interceptor deduplicates concurrent identical requests. When m
12451245
- `methods` - The [**safe** HTTP methods](https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1) to deduplicate. Default `['GET']`.
12461246
- `skipHeaderNames` - Header names that, if present in a request, will cause the request to skip deduplication entirely. Useful for headers like `idempotency-key` where presence indicates unique processing. Header name matching is case-insensitive. Default `[]`.
12471247
- `excludeHeaderNames` - Header names to exclude from the deduplication key. Requests with different values for these headers will still be deduplicated together. Useful for headers like `x-request-id` that vary per request but shouldn't affect deduplication. Header name matching is case-insensitive. Default `[]`.
1248+
- `maxBufferSize` - Maximum bytes buffered per paused waiting deduplicated handler. If a waiting handler remains paused and exceeds this threshold, it is failed with an abort error to prevent unbounded memory growth. Default `5 * 1024 * 1024`.
12481249

12491250
**Usage**
12501251

0 commit comments

Comments
 (0)