Skip to content

Commit d1876da

Browse files
authored
Fix to build with current Boost libraries: (#7)
Adding array include to include/async_web_server_cpp/http_connection.hpp Boost class path member leaf is now replaced with filename, see boostorg/filesystem@5df060e
1 parent a12cd9c commit d1876da

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

include/async_web_server_cpp/http_connection.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <boost/noncopyable.hpp>
1111
#include <boost/shared_ptr.hpp>
1212
#include <boost/thread/mutex.hpp>
13+
#include <boost/array.hpp>
1314

1415
namespace async_web_server_cpp
1516
{

src/http_reply.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,19 +360,19 @@ bool FilesystemHttpRequestHandler::operator()(
360360
if (boost::filesystem::is_directory(itr->status()))
361361
{
362362
content << "<a href=\""
363-
<< itr->path().leaf().generic_string()
363+
<< itr->path().filename().generic_string()
364364
<< "/\">";
365-
content << itr->path().leaf().generic_string()
365+
content << itr->path().filename().generic_string()
366366
<< "/";
367367
content << "</a>";
368368
}
369369
else if (boost::filesystem::is_regular_file(
370370
itr->status()))
371371
{
372372
content << "<a href=\""
373-
<< itr->path().leaf().generic_string()
373+
<< itr->path().filename().generic_string()
374374
<< "\">";
375-
content << itr->path().leaf().generic_string();
375+
content << itr->path().filename().generic_string();
376376
content << "</a>";
377377
}
378378
content << "<br>";

0 commit comments

Comments
 (0)