ci: fix request_test.v (add missing \r to hardcoded post data)
parent
466ced2876
commit
3c6356ba36
|
@ -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>
|
<h2>File Upload</h2>
|
||||||
|
|
||||||
File form:
|
File form:
|
||||||
|
@ -13,3 +21,6 @@ Text form:
|
||||||
<input type="text" name="content2" value="xyz" />
|
<input type="text" name="content2" value="xyz" />
|
||||||
<input type="submit" value="Submit content">
|
<input type="submit" value="Submit content">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -103,16 +103,16 @@ fn test_parse_multipart_form() {
|
||||||
file := 'bar.v'
|
file := 'bar.v'
|
||||||
ct := 'application/octet-stream'
|
ct := 'application/octet-stream'
|
||||||
contents := ['baz', 'buzz']
|
contents := ['baz', 'buzz']
|
||||||
data := "--------------------------$boundary
|
data := "--$boundary
|
||||||
Content-Disposition: form-data; name=\"${names[0]}\"; filename=\"$file\"
|
Content-Disposition: form-data; name=\"${names[0]}\"; filename=\"$file\"\r
|
||||||
Content-Type: $ct
|
Content-Type: $ct\r
|
||||||
|
\r
|
||||||
${contents[0]}
|
${contents[0]}\r
|
||||||
--------------------------$boundary
|
--$boundary\r
|
||||||
Content-Disposition: form-data; name=\"${names[1]}\"
|
Content-Disposition: form-data; name=\"${names[1]}\"\r
|
||||||
|
\r
|
||||||
${contents[1]}
|
${contents[1]}\r
|
||||||
--------------------------$boundary--
|
--$boundary--\r
|
||||||
"
|
"
|
||||||
form, files := parse_multipart_form(data, boundary)
|
form, files := parse_multipart_form(data, boundary)
|
||||||
assert files == {
|
assert files == {
|
||||||
|
|
Loading…
Reference in New Issue