Skip to content

Fix null dereference when processing empty Alt-Svc headers - #136295

Closed
MihaZupan with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-nullreferenceexception-alt-svc
Closed

MihaZupan with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-nullreferenceexception-alt-svc

Conversation

Copilot AI commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Empty or separator-only Alt-Svc headers cause HTTPS requests to fail with NullReferenceException, even over HTTP/1.1. The parser accepts these values but returns a null result.

  • Null handling: Require a non-null AltSvcHeaderValue before processing, preserving valid Alt-Svc behavior.
  • Regression coverage: Add eight HTTPS HTTP/1.1 cases covering empty, whitespace-only, separator-only, and malformed values, including 200 and 302 responses, without requiring QUIC support.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
16 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Copilot AI changed the title [WIP] Fix NullReferenceException in HttpConnectionPool.HandleAltSvc Fix null dereference when processing empty Alt-Svc headers Oct 22, 2026
Copilot AI requested a review from MihaZupan October 22, 2026 15:21
@MihaZupan

Copy link
Copy Markdown
Member

There's also #136301 now

@MihaZupan MihaZupan closed this Oct 22, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullReferenceException in HttpConnectionPool.HandleAltSvc when a response has an empty Alt-Svc header (regression in .NET 10)

2 participants