Rework the server to remove rest_xxx classes.

This commit is contained in:
Chunting Gu
2019-06-21 13:53:00 +08:00
parent 43aadee885
commit 4140b4f94c
24 changed files with 311 additions and 318 deletions
+2 -1
View File
@@ -214,7 +214,8 @@ FormPart::FormPart(const std::string& name, const Path& path,
// Determine media type from file extension.
if (media_type_.empty()) {
std::string extension = path.extension().string();
media_type_ = media_types::FromExtension(extension, false);
// TODO: Default to "application/text"?
media_type_ = media_types::FromExtension(extension);
}
}