`rust-server-codegen`: fix deserialization of escaped query string data (#1058)
We are currently deserializing the query string into `Vec<(&str, &str)>`. `serde_urlencoded` panics if the input string slice contains escaped data, since in that case it needs to allocate a new `String` to unescape the input string slice's contents. Instead of deserializing to `Vec<(String, String)>`, we can instead use `Cow<'a, str>` so that deserialization only allocates when strictly required. Reference: https://github.com/serde-rs/serde/issues/1413#issuecomment-494892266
Loading
Please register or sign in to comment