镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[v7.x] fix(eventsource): validate Last-Event-ID on reconnect (#5746) - #6100

Open
mrityunjay-pandey wants to merge 1 commit into
nodejs:v7.xfrom
mrityunjay-pandey:backport/v7.x-eventsource-last-event-id
Open

mrityunjay-pandey wants to merge 1 commit into
nodejs:v7.xfrom
mrityunjay-pandey:backport/v7.x-eventsource-last-event-id

Conversation

@mrityunjay-pandey

Copy link
Copy Markdown
Contributor

This relates to...

Backport of #5746 to v7.x.

Rationale

The fix from #5746 is on main but not on v7.x. With only the test from #5746 applied to v7.x, test/eventsource/eventsource-reconnect.js fails on v7.x (# pass 3 # fail 2 ); with the fix it passes.

Changes

  • Clean cherry-pick of 32ea0ea (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 lint and npm run test:unit (1324 tests, 1320 passing, 0 failing). macOS CI on v7.x needs #6069.

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-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (7507102) to head (99d1354).
⚠️ Report is 2 commits behind head on v7.x.

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.
📢 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.

This branch has not been deployed

No deployments
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.

3 participants