-
Notifications
You must be signed in to change notification settings - Fork 679
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
Encoded QueryStringParam shows !A(MISSING) #446
Comments
I think this line is the problem. |
@RafPe Do you mind helping with the tiny test cases or test request data? It will be helpful to replicate at my end and addressing an issue. |
@jeevatkm would this work RaftechNL/akamai-cli-netlist#30 (comment) ? Its part of the refferenced issue here. In short it happens when we have special characters in query string. |
@RafPe I have read the issue you have referred. It seems this param Right here Request URI is grabbed and composed for debug log Line 277 in 79cc4d4
I think applying Escape for the overall debug log might have side effects. So it's better to address at the URI processing end. can you help to find out those special characters as best you can? So that it will be helpful. |
@RafPe Also after reading your referred issue. I think param fmt.Printf("%s hello %A", "welcome")
// output
// welcome hello %!A(MISSING)
fmt.Printf("accountSwitchKey=F-AC-XXXXXXX%AY-YYYY\n")
// output
// accountSwitchKey=F-AC-XXXXXXX%!A(MISSING)Y-YYYY So, if apply the
Personally, I feel Resty will get confused more because the query string has an incorrect value that gets logged. |
@moorereason your thoughts |
@jeevatkm The param query string accountSwitchKey in deed was the one causing problem. The situation was caused by using the following characters In my opinion the debug URI should reflect what is being actually sent to the end server as request ( imho ) |
@RafPe Thanks for the info. Do you mean |
@jeevatkm I believe it did. Based on my tests there thats what I got
|
Somewhere along the way, the However, I'm unable to reproduce this issue with a simple test: package main
import "github.com/go-resty/resty/v2"
func main() {
_, err := resty.New().SetDebug(true).R().Get("http://httpbingo.org/get?foo=XX:YY")
if err != nil {
panic(err)
}
} I don't see anywhere in resty where we're misusing a printf-style function which would cause this problem. @RafPe, can you make sure you're using the latest resty release? How exactly is your project using resty? |
@moorereason Resty is being used as http client within my apis base client which then in response is used in specific multiple service implementations. The behaviour happens when I use the functionality of setting query string param - so not directly via URL. For the current version I will have to check - but I'm sure I was updating it locally while debugging the referenced issue |
It looks to me like you're using v2.0.0. v2.0.0 had a misuse of |
@moorereason I will double check that tomorrow and confirm to you what is the precise version I get this behaviour |
@RafPe Yeah, it seems upstream lib go-edgegrid using Resty v2.0.0 Can you try the latest version and share feedback? |
Upgrading to Resty v2.3.0 or later would be appropriate to overcome this debug log issue. |
Hi ,
When working with resty & querystring params I noticed that when showing debug output and having special characters in queryParamString it shows them as
!A(MISSING)
altough query is properly formated and sentIts not a show stopper - but confuses end users when debugging.
The text was updated successfully, but these errors were encountered: