Skip to content

Conversation

@sheldonrobinson
Copy link
Contributor

  1. Changed
final acceptHeader = req.headers.value(HttpHeaders.acceptHeader);
if (acceptHeader == null || !acceptHeader.contains("text/event-stream")) {

to

final acceptHeader = req.headers.value(HttpHeaders.acceptHeader) ?? '';
if (!acceptHeader.contains("text/event-stream")) {

so acceptHeader is never null.

  1. Update header content-type to text/event-stream; charset=utf-8 as per MCP Transports Specification

@leehack
Copy link
Owner

leehack commented Dec 29, 2025

@sheldonrobinson thanks for the contribution!. Would you mind running "dart format ."? It seems the pana is losing 10 points due to the format issue.

@sheldonrobinson
Copy link
Contributor Author

@leehack Fix format

@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.59%. Comparing base (7c53b3b) to head (40f0490).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/server/streamable_https.dart 66.66% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
- Coverage   78.62%   78.59%   -0.03%     
==========================================
  Files          40       40              
  Lines        5066     5069       +3     
==========================================
+ Hits         3983     3984       +1     
- Misses       1083     1085       +2     
Flag Coverage Δ
unittests 78.59% <66.66%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@leehack leehack merged commit 3a56fe9 into leehack:main Dec 31, 2025
1 of 3 checks passed
@sheldonrobinson sheldonrobinson deleted the upstream branch December 31, 2025 16:59
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.

2 participants