Closed StarpTech closed 2 years ago
Hi @StarpTech, thanks fur submitting this issue.httpmock
uses qstring
to convert query strings into key/value pairs (see here). It seems that it doesn't handle that situation correctly as it only treats %20
as a space but not +
.
The reason seems to be the usage of percent_decode
, which in turn only handles "percent" values as per https://url.spec.whatwg.org/#percent-decode.
It seems to be a known open issue in qstring
though: https://github.com/algesten/qstring/issues/3. The library seems unmaintained, so it might be a candidate for a replacement in future.
Hi @alexliesenfeld thanks for the detailed response. We could switch to https://github.com/servo/rust-url.
Should be fixed in release v0.6.6.
Hi, first of all, thanks for the great library. We found an issue with
query_param
. According to the documentation, it's not necessary to encode the query value.In order to match, we need to replace spaces with
+
. I'd expect that this library can handle it for me so I don't need to care about encoding internals.Reference: https://url.spec.whatwg.org/#url-parsing (spaceAsPlus)