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
It seems impossible to assert binary query params encoded by url::form_urlencoded::byte_serialize with when.query_param("key", "value"), because Url::parse (introduced in #59) converts all query param values into String, while all non-utf8 characters are replaced by U+FFFD REPLACEMENT CHARACTER (see servo/rust-url#219 for details).
A possible workaround might be exposing the raw request URL from HttpMockRequest, which can be checked by other methods without decoding the query params (e.g.: regexp matching).
The text was updated successfully, but these errors were encountered:
Yes, URIs are limited to containing characters as per rfc3986, section 2.3, hence the entire URI, including the query, is represented as a string. Is UTF-8 not enough to represent the characters you want to verify or what is your scenario?
As per living standard though, in fact binary content should be possible to represent in the query. So I'd say exposing it in its binary representation in HttpMockRequest could be an option for such cases.
It seems impossible to assert binary query params encoded by
url::form_urlencoded::byte_serialize
withwhen.query_param("key", "value")
, becauseUrl::parse
(introduced in #59) converts all query param values intoString
, while all non-utf8 characters are replaced byU+FFFD REPLACEMENT CHARACTER
(see servo/rust-url#219 for details).A possible workaround might be exposing the raw request URL from
HttpMockRequest
, which can be checked by other methods without decoding the query params (e.g.: regexp matching).The text was updated successfully, but these errors were encountered: