Add percent_encode_noop configuration to Form (#467)

Some implementations of multipart/form parsing don't support alternate
encodings, but do allow unicode in 'standard' parameter values. This
change allows users to specify that they do not want to encode
parameters.

(See also: #419, #420.)
This commit is contained in:
Ian Smith
2019-03-04 11:21:35 -08:00
committed by Sean McArthur
parent aa8348ba1e
commit 215981e7a0
2 changed files with 18 additions and 0 deletions

View File

@@ -130,6 +130,11 @@ impl Form {
self.with_inner(|inner| inner.percent_encode_attr_chars())
}
/// Configure this `Form` to skip percent-encoding
pub fn percent_encode_noop(self) -> Form {
self.with_inner(|inner| inner.percent_encode_noop())
}
pub(crate) fn reader(self) -> Reader {
Reader::new(self)
}