Skip to content

Conversation

@ThomsonTan
Copy link
Contributor

@ThomsonTan ThomsonTan commented Nov 21, 2025

Fixes #3754

Changes

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.94%. Comparing base (b568e71) to head (d4bf0e4).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@ Coverage Diff @@ ## main #3758 +/- ## ========================================== + Coverage 89.93% 89.94% +0.01%  ========================================== Files 225 225 Lines 7158 7163 +5 ========================================== + Hits 6437 6442 +5  Misses 721 721 
Files with missing lines Coverage Δ
api/include/opentelemetry/baggage/baggage.h 98.20% <100.00%> (+0.91%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@ThomsonTan ThomsonTan marked this pull request as ready for review December 11, 2025 19:43
@ThomsonTan ThomsonTan requested a review from a team as a code owner December 11, 2025 19:43
Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with minor cleanup.

Comment on lines +277 to +278
else if (str[i] >= ' ' && str[i] <= '~' && str[i] != '"' && str[i] != ',' && str[i] != ';' &&
str[i] != '\\')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several comments:

  1. Please add a comment that points to the spec: https://www.w3.org/TR/baggage/#definition, to explain what this is about.

  2. Per the spec, a space (20) should be illegal. the test str[i] >= ' ' seems broken.

  3. Consider using parenthesis and comments for better readability, as in

if ( (str[i] >= '!' ) /* 21 */ && (str[i] <= '~' ) /* 7E */ && (str[i] != '"') /* 22 */ && (str[i] != ',') /* 2C */ && (str[i] != ';') /* 3B */ && (str[i] != '\\')) /* 5C */ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants