-
Notifications
You must be signed in to change notification settings - Fork 701
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
Debug emits incorrect body when body contains % #270
Comments
kmanley
pushed a commit
to kmanley/resty
that referenced
this issue
Sep 10, 2019
@kmanley Thank you for reporting an issue and PR too 😄 BTW, |
Hi @jeevatkm yes I am using latest resty via go get. |
@kmanley Okay, thanks I have merged your PR into master. |
Great - thanks for making resty it has saved me a lot of time 👍 |
Thank you @kmanley |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the request body contains a % (e.g. because it has urlencoded form data) then the debug logger attempts to interpret the body as a format string with no params, because it uses Logger.Debugf which uses Printf. This causes the output to show printf errors.
You end up with something malformed in the debug output like this
This is bad because the whole point of the debug output is to show what is going out on the wire, and this does not correctly represent what's going on the wire.
I will submit a PR
The text was updated successfully, but these errors were encountered: