-
Notifications
You must be signed in to change notification settings - Fork 510
[API] Parse baggage value as spec compliant #3758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
marcalff
left a comment
There was a problem hiding this 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.
| else if (str[i] >= ' ' && str[i] <= '~' && str[i] != '"' && str[i] != ',' && str[i] != ';' && | ||
| str[i] != '\\') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several comments:
-
Please add a comment that points to the spec: https://www.w3.org/TR/baggage/#definition, to explain what this is about.
-
Per the spec, a space (20) should be illegal. the test
str[i] >= ' 'seems broken. -
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 */
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.mdupdated for non-trivial changes