net.http: fix request_test.v

pull/11471/head
Alexander Medvednikov 2021-09-11 06:16:00 +03:00
parent f9eb14d914
commit 90e04d03b2
2 changed files with 4 additions and 3 deletions

View File

@ -244,7 +244,7 @@ fn parse_form(body string) map[string]string {
// ...
}
struct FileData {
pub struct FileData {
pub:
filename string
content_type string

View File

@ -1,5 +1,6 @@
module vweb
import net.http
import io
struct StringReader {
@ -114,9 +115,9 @@ Content-Disposition: form-data; name=\"${names[1]}\"
${contents[1]}
--------------------------$boundary--
"
form, files := parse_multipart_form(data, boundary)
form, files := http.parse_multipart_form(data, boundary)
assert files == {
names[0]: [FileData{
names[0]: [http.FileData{
filename: file
content_type: ct
data: contents[0]