mirror of
https://github.com/servo/servo.git
synced 2025-10-01 09:09:15 +01:00
Auto merge of #12780 - izgzhen:xhr-file-upload, r=Manishearth
Add XHR support for FormData and related fixes + Update IDL for `FormData`, and related fixes + Reuse `htmlformelement::FormDatum` for `formdata.rs` for a uniform representation, and related fixes + Add support for `FormData` branch of XHR `BodyInit`. + Fixes a lot of related WPT tests --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes OR <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12780) <!-- Reviewable:end -->
This commit is contained in:
commit
ddf4e68c91
13 changed files with 173 additions and 174 deletions
|
@ -21,7 +21,7 @@ def main(request, response):
|
|||
boundary = content_type[1].strip("boundary=")
|
||||
|
||||
body = "--" + boundary + "\r\nContent-Disposition: form-data; name=\"file-input\"; filename=\"upload.txt\""
|
||||
body += "\r\n" + "text/plain\r\n\r\nHello\r\n--" + boundary + "--"
|
||||
body += "\r\n" + "content-type: text/plain\r\n\r\nHello\r\n--" + boundary + "--"
|
||||
|
||||
if body != request.body:
|
||||
return fail("request body doesn't match: " + body + "+++++++" + request.body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue