You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have an input filed which should be send to the server for filtering which can be entered by an user.
when he types some words+ (a little contrieved, i know, but still possible) Google Chrome generates the following request to the server: https://server/api/endpoint?filter%5Bquery%5D=some+words%2B&page%5Bsize%5D=100 Which looks fine to me.
When parsing the querystring it gives the following result: Ok(Object({"filter": Object({"query": String("some+words+")}), "page": Object({"size": String("100")})}))
In this Object the real plus is indistinguishable from the plus as space character.
I try an create a failing test in a PR and fix the problem later.
(There apparently is a difference between decoding a url and getting the query_params as pairs which has to do with if the parser is in urlformdecode mode or not. Don't Ask me)
The text was updated successfully, but these errors were encountered:
Hello,
i have an input filed which should be send to the server for filtering which can be entered by an user.
when he types
some words+
(a little contrieved, i know, but still possible) Google Chrome generates the following request to the server:https://server/api/endpoint?filter%5Bquery%5D=some+words%2B&page%5Bsize%5D=100
Which looks fine to me.When parsing the querystring it gives the following result:
Ok(Object({"filter": Object({"query": String("some+words+")}), "page": Object({"size": String("100")})}))
In this Object the real plus is indistinguishable from the plus as space character.
This probably stems from first calling
url::percent_decode
and then using its own parse_pairs instead of directly using https://docs.rs/url/1.7.2/url/struct.Url.html#method.query_pairsI try an create a failing test in a PR and fix the problem later.
(There apparently is a difference between decoding a url and getting the query_params as pairs which has to do with if the parser is in urlformdecode mode or not. Don't Ask me)
The text was updated successfully, but these errors were encountered: