1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix request_test.v (add missing \r to hardcoded post data)

This commit is contained in:
Delyan Angelov 2021-11-10 18:15:39 +02:00
parent 466ced2876
commit 3c6356ba36
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 21 additions and 10 deletions

View File

@ -1,3 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Test multipart/form-data file uploading</title>
</head>
<body>
<h2>File Upload</h2>
File form:
@ -13,3 +21,6 @@ Text form:
<input type="text" name="content2" value="xyz" />
<input type="submit" value="Submit content">
</form>
</body>
</html>

View File

@ -103,16 +103,16 @@ fn test_parse_multipart_form() {
file := 'bar.v'
ct := 'application/octet-stream'
contents := ['baz', 'buzz']
data := "--------------------------$boundary
Content-Disposition: form-data; name=\"${names[0]}\"; filename=\"$file\"
Content-Type: $ct
${contents[0]}
--------------------------$boundary
Content-Disposition: form-data; name=\"${names[1]}\"
${contents[1]}
--------------------------$boundary--
data := "--$boundary
Content-Disposition: form-data; name=\"${names[0]}\"; filename=\"$file\"\r
Content-Type: $ct\r
\r
${contents[0]}\r
--$boundary\r
Content-Disposition: form-data; name=\"${names[1]}\"\r
\r
${contents[1]}\r
--$boundary--\r
"
form, files := parse_multipart_form(data, boundary)
assert files == {