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

vweb: split and parse Content-Type header correctly (#9756)

This commit is contained in:
Miccah
2021-04-16 00:46:06 -05:00
committed by GitHub
parent b11b744630
commit e2be3ec396
5 changed files with 37 additions and 5 deletions

View File

@ -112,17 +112,16 @@ ${contents[1]}
--------------------------$boundary--
'
form, files := parse_multipart_form(data, boundary)
// TODO: remove newlines
assert files == map{
names[0]: [FileData{
filename: file
content_type: ct
data: contents[0] + '\n'
data: contents[0]
}]
}
assert form == map{
names[1]: contents[1] + '\n'
names[1]: contents[1]
}
}