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>
|
||||
|
||||
File form:
|
||||
|
@ -13,3 +21,6 @@ Text form:
|
|||
<input type="text" name="content2" value="xyz" />
|
||||
<input type="submit" value="Submit content">
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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 == {
|
||||
|
|
Loading…
Reference in New Issue