From 629c57122deab00f255add8332b928037d483ef9 Mon Sep 17 00:00:00 2001 From: Julian Francis Date: Fri, 29 Aug 2025 09:34:16 +0100 Subject: [PATCH] Fix to build with current Boost libraries: Adding array include to include/async_web_server_cpp/http_connection.hpp Boost class path member leaf is now replaced with filename, see https://github.com/boostorg/filesystem/commit/5df060e95ca844fe91b29001b4ae22bdb65635c6 --- include/async_web_server_cpp/http_connection.hpp | 1 + src/http_reply.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/async_web_server_cpp/http_connection.hpp b/include/async_web_server_cpp/http_connection.hpp index 8f5e92e..62ccd89 100644 --- a/include/async_web_server_cpp/http_connection.hpp +++ b/include/async_web_server_cpp/http_connection.hpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace async_web_server_cpp { diff --git a/src/http_reply.cpp b/src/http_reply.cpp index 40e7402..c1eff65 100644 --- a/src/http_reply.cpp +++ b/src/http_reply.cpp @@ -360,9 +360,9 @@ bool FilesystemHttpRequestHandler::operator()( if (boost::filesystem::is_directory(itr->status())) { content << "path().leaf().generic_string() + << itr->path().filename().generic_string() << "/\">"; - content << itr->path().leaf().generic_string() + content << itr->path().filename().generic_string() << "/"; content << ""; } @@ -370,9 +370,9 @@ bool FilesystemHttpRequestHandler::operator()( itr->status())) { content << "path().leaf().generic_string() + << itr->path().filename().generic_string() << "\">"; - content << itr->path().leaf().generic_string(); + content << itr->path().filename().generic_string(); content << ""; } content << "
";