Fix ResponseHeaderFields.ToString() to emit Connection header from property instead of hardcoding "Upgrade"#12
Merged
ReneSchwarzer merged 2 commits intodevelopfrom Apr 4, 2026
Conversation
…d of hardcoding Connection: Upgrade Agent-Logs-Url: https://github.com/webexpress-framework/WebExpress.WebCore/sessions/e8d260a2-11b1-4b7a-a8fc-0c154ce33291 Co-authored-by: ReneSchwarzer <31061438+ReneSchwarzer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update installation documentation for clarity
Fix ResponseHeaderFields.ToString() to emit Connection header from property instead of hardcoding "Upgrade"
Apr 4, 2026
ReneSchwarzer
approved these changes
Apr 4, 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.
ResponseHeaderFields.ToString()hardcodedConnection: UpgradewheneverUpgradewas set, making theConnectionproperty effectively unused in HTTP output. This broke any response that setConnectionto a value other than"Upgrade", and silently dropped theConnectionheader for any response that didn't also setUpgrade.Changes
ResponseHeaderFields.cs: DecoupleConnectionandUpgradeheader emission — each is now written independently when its property is non-empty.Connection: Upgradeis no longer hardcoded.ResponseSwitchingProtocolsalready explicitly setsHeader.Connection = connection, so WebSocket 101 handshakes continue to emit the correct headers without any changes to the caller.