mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
0b90bb486c
* Added tests for content-type to mime-type detection. Added a custom_content_types test case that verifies that a user can specify the mime-type through the contentType parameter upon creation of a response. If their contentType does not appear in the mime_types map, but looks like a valid mime type already, it should be used as the mime type. Validating against the full list of valid mime types (https://www.iana.org/assignments/media-types/media-types.xhtml) would be too intensive, so we merely verify that the parent type (application, audio, font, text, image, etc) is a valid RFC6838 type, and that the subtype is at least one character. Thus we can verify that custom/type fails, and incomplete strings such as image/ and /json fail. |
||
---|---|---|
.. | ||
img | ||
multi_file | ||
ssl | ||
template | ||
catch.hpp | ||
CMakeLists.txt | ||
unittest.cpp |