-
Notifications
You must be signed in to change notification settings - Fork 485
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
feat: Accept URL escape for device command name and resource name #4376
Conversation
774b1da
to
44004a9
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #4376 +/- ##
==========================================
- Coverage 43.71% 43.68% -0.03%
==========================================
Files 116 116
Lines 10713 10719 +6
==========================================
Hits 4683 4683
- Misses 5610 5614 +4
- Partials 420 422 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
3f9a769
to
6ccadbc
Compare
commandName := topicLevels[length-2] | ||
commandName, err := url.QueryUnescape(topicLevels[length-2]) | ||
if err != nil { | ||
lc.Errorf("Failed to unescape command name '%s'", commandName) |
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.
lc.Errorf("Failed to unescape command name '%s'", commandName) | |
lc.Errorf("Failed to unescape command name '%s'", commandName) | |
lc.Warn("Not publishing error message back due to insufficient information on response topic") | |
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.
Added the log.
- Use router.UseEncodedPath() to match the encoded original path to the routes - Decode the Url path variable before passing to the controller Close edgexfoundry#4371 Signed-off-by: bruce <weichou1229@gmail.com>
6ccadbc
to
a9b60e8
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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
Close #4371
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:
describing the break)Testing Instructions
:
New Dependency Instructions (If applicable)