Fixed HttpHeader::parse signature, and added ContentDisposition::parse
This commit is contained in:
parent
5e5a4c8c3b
commit
a3d70bbcb5
2 changed files with 67 additions and 4 deletions
|
|
@ -192,4 +192,22 @@ int main() {
|
|||
assert(range.first->second == "æ%ø&å?");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
{
|
||||
SimpleWeb::CaseInsensitiveMultimap solution = {{"form-data", ""}};
|
||||
auto parsed = SimpleWeb::ContentDisposition::parse("form-data");
|
||||
assert(parsed == solution);
|
||||
}
|
||||
{
|
||||
SimpleWeb::CaseInsensitiveMultimap solution = {{"form-data", ""}, {"name", "file"}};
|
||||
auto parsed = SimpleWeb::ContentDisposition::parse("form-data; name=\"file\"");
|
||||
assert(parsed == solution);
|
||||
}
|
||||
{
|
||||
SimpleWeb::CaseInsensitiveMultimap solution = {{"form-data", ""}, {"name", "file"}, {"filename", "filename.png"}};
|
||||
auto parsed = SimpleWeb::ContentDisposition::parse("form-data; name=\"file\"; filename=\"filename.png\"");
|
||||
assert(parsed == solution);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue