Handle all possible subtypes

Accept header allows any possible parameter value, and expects
that unknown property subtypes are simply ignored.

We were previously enforcing that things either match q=<number>
or have no params.  bmcweb has no usage of the params, but allow
them to parse silently per the spec in case someone sends them.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types#structure_of_a_mime_type

This more meets the intent.  In theory we could parse only q and charset
values, but allowing any key/values here makes us more resilient against
new mime types being added.

Tested: Unit tests included and passing

Change-Id: I1500be0da4c0c72185ee5bda5dfc31885dc6102d
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/test/include/http_utility_test.cpp b/test/include/http_utility_test.cpp
index 2a5e8a7..018a5f4 100644
--- a/test/include/http_utility_test.cpp
+++ b/test/include/http_utility_test.cpp
@@ -81,6 +81,15 @@
                                       cborJson),
               ContentType::CBOR);
 
+    EXPECT_EQ(
+        getPreferredContentType("application/json;charset=UTF-8", htmlJson),
+        ContentType::JSON);
+
+    std::array<ContentType, 1> eventStream{ContentType::EventStream};
+    EXPECT_EQ(
+        getPreferredContentType("text/event-stream;charset=UTF-8", eventStream),
+        ContentType::EventStream);
+
     EXPECT_EQ(getPreferredContentType("application/json", cborJson),
               ContentType::JSON);
     EXPECT_EQ(getPreferredContentType("*/*", cborJson), ContentType::ANY);