Implement MIME parsing
This commit adds two core features to bmcweb:
1. A multipart mime parser that can read multipart form requests into
bmcweb. This is implemented as a generic parser that identifies the
content-type strings and parses them into structures.
2. A /login route that can be logged into with a multipart form. This
is to allow changing the login screen to a purely forms based
implementation, thus removing the very large whitelist we currently have
to maintain, and removing javascript from our threat envelope.
More testing is still needed, as this is a parser that exists outside of
the secured areas, but in this simple example, it seems to work well.
Tested: curl -vvvvv --insecure -X POST -F 'username=root' -F
'password=0penBmc' https://<bmc ip address>:18080/login
Returned; { "data": "User 'root' logged in", "message": "200 OK",
"status": "ok" }
Change-Id: Icc3f4c082d584170b65b9e82f7876926cd38035d
Signed-off-by: Ed Tanous<ed@tanous.net>
Signed-off-by: George Liu <liuxiwei@inspur.com>
diff --git a/meson.build b/meson.build
index bf34d5e..c9066d4 100644
--- a/meson.build
+++ b/meson.build
@@ -375,6 +375,7 @@
srcfiles_unittest = [
'http/ut/utility_test.cpp',
'include/ut/dbus_utility_test.cpp',
+ 'include/ut/multipart_test.cpp',
'include/ut/http_utility_test.cpp',
'include/ut/human_sort_test.cpp',
'redfish-core/ut/configfile_test.cpp',