aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-11-29 20:21:38 -0500
committerGitHub <noreply@github.com>2019-11-29 20:21:38 -0500
commit3db473714bc87c1c692ebf300620aa382bd9cd1b (patch)
treea86fa31cdc6f05f6aa21195796a6dd39105e81dc /components/script/dom
parentb945afe223ff45d8d36f97702d958ca33afff3c3 (diff)
parent3d322f96e3ee2233c0823d1a0aed0b608c8c6d8d (diff)
downloadservo-3db473714bc87c1c692ebf300620aa382bd9cd1b.tar.gz
servo-3db473714bc87c1c692ebf300620aa382bd9cd1b.zip
Auto merge of #24670 - glowe:add-crlf-to-boundary, r=Manishearth
Add CRLF to encoded multipart form data <!-- Please describe your changes on the following line: --> Some (3) WPT tests were failing because they expected the body for a multipart form data response to end with a CRLF. So I updated encode_multipart_form_data to add the missing terminator. Looking at the corresponding spec (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart%2Fform-data-encoding-algorithm) and RFC (https://tools.ietf.org/html/rfc7578), I couldn't find anything mentioned about this detail. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom')
-rwxr-xr-xcomponents/script/dom/htmlformelement.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs
index b09804e397c..913f5f8530a 100755
--- a/components/script/dom/htmlformelement.rs
+++ b/components/script/dom/htmlformelement.rs
@@ -1366,7 +1366,7 @@ pub fn encode_multipart_form_data(
}
}
- let mut boundary_bytes = format!("\r\n--{}--", boundary).into_bytes();
+ let mut boundary_bytes = format!("\r\n--{}--\r\n", boundary).into_bytes();
result.append(&mut boundary_bytes);
result