[API] Baggage - Trim white spaces and check for semi colon which isn't allowed octet#7009
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7009 +/- ##
==========================================
+ Coverage 88.79% 88.83% +0.03%
==========================================
Files 271 271
Lines 12970 12976 +6
==========================================
+ Hits 11517 11527 +10
+ Misses 1453 1449 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Please add a CHANGELOG entry. |
|
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Benchmark Results SummaryCompleted benchmarks with changes
Raw DataBefore my changes: After my changes @martincostello One other thing, I was looking at how the benchmarking is working. Execution Summary
|
|
If the code path you're touching isn't benchmarked, then let's add another that deals with that path. |
Benchmark changesI changed how the baggageHeader is being built, keys and values need to be trimmed now and semicolon needs to be removed Raw DataAfter my changes Before my changes These two rows are standouts: Interestingly mean time after my changes has decreased, I thought this would be a slight deterioration. |
…s.cs Co-authored-by: Martin Costello <martin@martincostello.com>
Towards #6816, #5210
Changes
BaggagePropagatorto trim optional whitespace (OWS) around=separatorswhen parsing the
baggageheader, as required by theW3C Baggage specification. This caused
incompatibility with .NET 10's default W3C propagator, which emits headers with
OWS (e.g.
key = value), resulting in spaces being URL-encoded as+inoutbound headers received by downstream services.
BaggagePropagatorto strip baggage properties (;metadata) from valueswhen parsing the
baggageheader. Semicolon is not a validbaggage-octetperthe W3C Baggage specification and must be interpreted as the start of a property,
not part of the value.
(#5210)
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changesI don't think this is non-trivial but let me know if I need to do this