aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlformelement.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2018-12-03 01:45:58 -0500
committerJosh Matthews <josh@joshmatthews.net>2018-12-17 11:29:25 -0500
commit1c7cfafcc5891d1f07bf640e2d697c36d65a3222 (patch)
tree099f68c300e4182dbb9cb764fcaa08664930754a /components/script/dom/htmlformelement.rs
parent27c25116d3ad26cb4ba70f94da45818ec823ff72 (diff)
downloadservo-1c7cfafcc5891d1f07bf640e2d697c36d65a3222.tar.gz
servo-1c7cfafcc5891d1f07bf640e2d697c36d65a3222.zip
Don't alter query string when submitting form by POST.
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rwxr-xr-xcomponents/script/dom/htmlformelement.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs
index 89e2c9410ef..5469f0b7fc5 100755
--- a/components/script/dom/htmlformelement.rs
+++ b/components/script/dom/htmlformelement.rs
@@ -459,7 +459,8 @@ impl HTMLFormElement {
.headers
.typed_insert(ContentType::from(mime::APPLICATION_WWW_FORM_URLENCODED));
- self.set_encoding_override(load_data.url.as_mut_url().query_pairs_mut())
+ let mut url = load_data.url.clone();
+ self.set_encoding_override(url.as_mut_url().query_pairs_mut())
.clear()
.extend_pairs(
form_data
@@ -467,7 +468,7 @@ impl HTMLFormElement {
.map(|field| (field.name.clone(), field.replace_value(charset))),
);
- load_data.url.query().unwrap_or("").to_string().into_bytes()
+ url.query().unwrap_or("").to_string().into_bytes()
},
FormEncType::FormDataEncoded => {
let mime: Mime = format!("multipart/form-data; boundary={}", boundary)