Repository navigation
[v7.x] fix(eventsource): validate Last-Event-ID on reconnect (#5746) - #6100
Open
mrityunjay-pandey wants to merge 1 commit into
Open
mrityunjay-pandey wants to merge 1 commit into
mrityunjay-pandey wants to merge 1 commit into
Conversation
Encode last event IDs as UTF-8 before placing them in the internal header list. Clear stale values and omit IDs that cannot be transported as HTTP header values. Signed-off-by: Matteo Collina <hello@matteocollina.com> (cherry picked from commit 32ea0ea)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v7.x #6100 +/- ##
=======================================
Coverage 93.15% 93.16%
=======================================
Files 112 112
Lines 37626 37639 +13
=======================================
+ Hits 35052 35066 +14
+ Misses 2574 2573 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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...
Backport of #5746 to v7.x.
Rationale
The fix from #5746 is on
mainbut not onv7.x. With only the test from #5746 applied tov7.x,test/eventsource/eventsource-reconnect.jsfails onv7.x(# pass 3 # fail 2 ); with the fix it passes.Changes
git cherry-pick -x), no conflicts.Features
N/A
Bug Fixes
Breaking Changes and Deprecations
N/A
Status
Tested locally on Windows with Node 24:
npm run lintandnpm run test:unit(1324 tests, 1320 passing, 0 failing). macOS CI on v7.x needs #6069.