mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add picking of encoding for url encoded data
This commit is contained in:
parent
9be649f8ed
commit
0f172491d3
1 changed files with 2 additions and 1 deletions
|
@ -321,7 +321,7 @@ impl HTMLFormElement {
|
|||
|
||||
result.push_str(&*format!("\r\n--{}--", boundary));
|
||||
|
||||
return result;
|
||||
result
|
||||
}
|
||||
|
||||
/// [Form submission](https://html.spec.whatwg.org/multipage/#concept-form-submit)
|
||||
|
@ -377,6 +377,7 @@ impl HTMLFormElement {
|
|||
load_data.headers.set(ContentType::form_url_encoded());
|
||||
|
||||
form_urlencoded::Serializer::new(String::new())
|
||||
.encoding_override(Some(self.pick_encoding()))
|
||||
.extend_pairs(form_data.into_iter().map(|field| (field.name.clone(), field.value_str())))
|
||||
.finish()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue