Crow/tests
Jake Arkinstall 0b90bb486c
Address #534 - handling missing mime types gracefully (#536)
* 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.
2022-09-12 14:16:16 +03:00
..
img Create failing test. 2022-04-16 17:31:12 -04:00
multi_file fixed multiple definition problem and added test to make sure it doesn't 2022-02-23 06:00:00 +03:00
ssl replace std::error_code with asio::error_code. 2022-06-18 17:21:37 +03:00
template Made template render() function return a returnable instead of a string 2022-02-18 04:25:02 +03:00
catch.hpp update catch2 to v2.13.8 2022-01-22 19:27:08 +01:00
CMakeLists.txt Crow's current features (ssl and compression) can now be enabled through 'CROW_FEATURES' instead of their own CMake variables. 2022-04-04 20:36:57 +02:00
unittest.cpp Address #534 - handling missing mime types gracefully (#536) 2022-09-12 14:16:16 +03:00