mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-21 11:39:48 +00:00
Drop Str2tagTest unit test that broke split / no-exceptions builds
The test referenced detail::can_compress_content_type, which lives below the split BORDER in httplib.h and is therefore not visible to test.cc in test_split / Windows-CMake builds. EXPECT_NO_THROW also expanded to a try/catch that would not compile under -fno-exceptions. The OSS-Fuzz reproducer in test/fuzzing/corpus already serves as the regression test for #508087118 and is exercised by make fuzz_test.
This commit is contained in:
1 parent
35c4026c7f
commit
f6524c0802
1 file changed
-7
@@ -767,13 +767,6 @@ TEST(ParseAcceptHeaderTest, InvalidCases) {
|
|||||||
EXPECT_EQ(result[0], "text/*");
|
EXPECT_EQ(result[0], "text/*");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regression test for OSS-Fuzz #508087118: a long Content-Type ran str2tag
|
|
||||||
// recursively (one stack frame per character) and overflowed the stack.
|
|
||||||
TEST(Str2tagTest, LongInputDoesNotOverflowStack) {
|
|
||||||
std::string long_content_type(60000, 'x');
|
|
||||||
EXPECT_NO_THROW(detail::can_compress_content_type(long_content_type));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(ParseAcceptHeaderTest, ContentTypesPopulatedAndInvalidHeaderHandling) {
|
TEST(ParseAcceptHeaderTest, ContentTypesPopulatedAndInvalidHeaderHandling) {
|
||||||
Server svr;
|
Server svr;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user