Skip to content

Commit

Permalink
sources are in cpp files
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Mar 14, 2024
1 parent 9a46220 commit 8617b2f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 48 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ file(GLOB_RECURSE BOOST_HTTP_IO_HEADERS $<$<VERSION_GREATER_EQUAL:${CMAKE_VERSIO
include/boost/*.natvis
)

set(BOOST_HTTP_IO_SOURCES src/src.cpp)
file(GLOB_RECURSE BOOST_HTTP_IO_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include/boost PREFIX "" FILES ${BOOST_HTTP_IO_HEADERS})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "" FILES ${BOOST_HTTP_IO_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/src PREFIX "http_io" FILES ${BOOST_HTTP_IO_SOURCES})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES Jamfile)

add_library(boost_http_io ${BOOST_HTTP_IO_HEADERS} ${BOOST_HTTP_IO_SOURCES})
target_link_libraries(boost_http_io PUBLIC Threads::Threads)
Expand Down
23 changes: 22 additions & 1 deletion example/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,27 @@ namespace http_proto = boost::http_proto;
using namespace std::placeholders;
using tcp = boost::asio::ip::tcp;

//-----------------------------------------------
/*
serializer
empty body:
sr.start( m );
buffer sequence body:
sr.start( m, bs );
pull-based source:
sr.start( m, src );
push-based stream:
auto strm = sr.start_stream( m );
parser
*/
//-----------------------------------------------

// Return a reasonable mime type based on the extension of a file.
Expand Down Expand Up @@ -224,7 +245,7 @@ handle_request(
http_proto::status::bad_request, req, res, sr);

// Build the path to the requested file
std::string path;
std::string path;
path_cat(path, doc_root, req.target_text());
if(req.target_text().back() == '/')
path.append("index.html");
Expand Down
30 changes: 0 additions & 30 deletions include/boost/http_io/src.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
// Official repository: https://github.com/CPPAlliance/http_io
//

#ifndef BOOST_HTTP_IO_DETAIL_IMPL_EXCEPT_IPP
#define BOOST_HTTP_IO_DETAIL_IMPL_EXCEPT_IPP

#include <boost/http_io/detail/config.hpp>
#include <boost/http_io/detail/except.hpp>
#include <boost/throw_exception.hpp>
Expand All @@ -32,5 +29,3 @@ throw_logic_error(
} // detail
} // http_io
} // boost

#endif
10 changes: 0 additions & 10 deletions src/src.cpp

This file was deleted.

0 comments on commit 8617b2f

Please sign in to comment.