From b91767686124e9a1827f1474b3d29f5f76b35e9f Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 16 Oct 2026 09:56:19 -0400 Subject: [PATCH] Declare set_file_content_provider for the split build FileContentProviderStaysWithinFile, added in e374966, calls detail::set_file_content_provider, which split.py moves into httplib.cc, so test_split did not compile. Declare it in the test, as the other tests that call into detail:: already do. --- test/test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test.cc b/test/test.cc index 0cb52a89..14306e8f 100644 --- a/test/test.cc +++ b/test/test.cc @@ -12354,6 +12354,15 @@ TEST(ResponseContentSourceTest, LastContentSetterWins) { } } +// Forward declaration (see the base64_encode note). +namespace httplib { +namespace detail { +void set_file_content_provider(Response &res, const std::shared_ptr &m, + const std::string &content_type, + EncodingType encoding); +} // namespace detail +} // namespace httplib + TEST(ResponseContentSourceTest, FileContentProviderStaysWithinFile) { auto mm = std::make_shared("./www/dir/test.html"); ASSERT_TRUE(mm->is_open());