Repository navigation
Fix W3CPropagator baggage parsing after malformed entries - #129287
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates W3C baggage parsing to be more resilient by skipping malformed entries instead of failing the entire header, and adds tests to validate the new behavior.
Changes:
- Add coverage ensuring malformed baggage list items don’t prevent decoding of subsequent valid items.
- Update
TryExtractBaggageloop tocontinueon malformed entries rather thanbreak.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/libraries/System.Diagnostics.DiagnosticSource/tests/W3CPropagatorTests.cs | Adds tests asserting malformed baggage entries are skipped and valid entries still decode. |
| src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/W3CPropagator.cs | Changes baggage parsing to advance past malformed items instead of aborting parsing. |
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/area-system-diagnostics-tracing |
Member
|
Although the spec leaving it to the system to decide if continue parsing or ignore the whole baggage-string, I agree it is better to ignore only the malformed entry and continue parsing (as other SDKs do). CC @noahfalk |
1 of 4 tasks
eiriktsarpalis
pushed a commit
that referenced
this pull request
Jul 15, 2026
Fixes #129286 Whole description in the linked issues.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #129286
Whole description in the linked issues.