-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug] Fix query string parameter pass to fiber context #2164
Conversation
Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
@ancogamer the change in the pull request before is from you, can you check if this is correct here or give background information |
@@ -883,11 +882,6 @@ func (app *App) Test(req *http.Request, msTimeout ...int) (resp *http.Response, | |||
return nil, err | |||
} | |||
|
|||
// adding back the query from URL, since dump cleans it | |||
dumps := bytes.Split(dump, []byte(" ")) |
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.
I think the description and title of the PR should be filled in according to pull request template .
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.
Sorry about that!!!
Hi, sorry for the late, the problem was, only the url was processing, so if you tried to use some query params (?foo:bar), it was simply ignored, so what i did was just manipulate the result string to add those. |
but is this change okay or not ? |
Dont see any problem, but the response of Test wont have anymore the query on it. @joseroberto can you show a example of how to get those values on test case ? |
@ancogamer Dear, your change suppresses query string parameter's to be passed throw the context. dumps[1] = []byte(req.URL.String()). <---- this remove all the URI query string Before:
|
Well, @ReneWerner87 to me this change looks fine. Sorry for the problens, i dont know why, but when i add it, the DumpRequest, wasn't returning the ?query, looks like it was fixed. |
Ok thx for the clarification |
Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
Description
Remove this change (#1909).
Fix test when using query string parameter.
When you use
/foo?bar=boo
, your test case should able to QueryParser parameter from fiber.Ctx:Type of change
Please delete options that are not relevant.
Checklist: