Adds '+' character to allowed characters in baggage value - #4898
Conversation
Codecov ReportBase: 90.90% // Head: 90.98% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #4898 +/- ##
============================================
+ Coverage 90.90% 90.98% +0.07%
- Complexity 4803 4839 +36
============================================
Files 545 546 +1
Lines 14340 14439 +99
Branches 1383 1395 +12
============================================
+ Hits 13036 13137 +101
+ Misses 897 894 -3
- Partials 407 408 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Your interpretation is correct. I also wondered if there is any performance benefit in checking for the presence of I think its either this approach or vendoring in some other url decoder like apache URLCodec. |
jack-berg
left a comment
There was a problem hiding this comment.
This is looking good. Just a couple of minor cleanups.
| * @return decoded value | ||
| */ | ||
| @Nullable | ||
| static String decode(@Nullable String value, Charset charset) { |
There was a problem hiding this comment.
Looks like value is never null. Can remove the @Nullable annotation on the value argument, and also maybe on the response. That should improve test coverage.
Same recommendation applies to private static byte[] decode(@Nullable byte[] bytes) above.
jack-berg
left a comment
There was a problem hiding this comment.
Just the one last comment about @Nullable. Thanks!
…etry#4898) * Adds '+' character to allowed characters in baggade value * Formatting fix * Adda BaggageCodec implementation * Additional cleanup * Removal of Nullable method parameters. * Additional tests for baggage decoding
This is a bit dirty way to fix it, but the alternative would be to rewrite from scratch
URLDecoder, which treats+character asspace. We can't useURLDecordersource code and modify it, since it is GPL licensed (at least that is how I understand it).Maybe we could use some other implementation of URL Decoder that allows for greater customization, but nothing comes to my mind.
Fixes: #4892