forked from boostorg/beast
fix #123 fix #154 fix #265 This completely replaces the HTTP parser used to read and parse incoming messages. The new version is faster than the old one, and written in fewer lines. A summary of changes: * parse and async_parse renamed to read and async_read * basic_parser is optimized for linear buffers, use flat_streambuf for the best performance with these functions: - http::read - http::read_some - http::async_read - http::async_read_some * The overloads of read() and async_read() which take just a header have been removed, since they would throw away important parse metadata. * The derived class callbacks for basic_parser have been streamlined. All strings passed to callbacks are presented in their entirety, instead of being provided in pieces. These changes allow use-cases that were previously difficult or impossible, such as: - Efficient relaying - Late body type commitment - Expect: 100-continue handling
52 lines
1.1 KiB
CMake
52 lines
1.1 KiB
CMake
# Part of Beast
|
|
|
|
GroupSources(extras/beast extras)
|
|
GroupSources(include/beast beast)
|
|
GroupSources(test/http "/")
|
|
|
|
add_executable (http-tests
|
|
${BEAST_INCLUDES}
|
|
${EXTRAS_INCLUDES}
|
|
message_fuzz.hpp
|
|
test_parser.hpp
|
|
../../extras/beast/unit_test/main.cpp
|
|
basic_dynabuf_body.cpp
|
|
basic_fields.cpp
|
|
basic_parser.cpp
|
|
concepts.cpp
|
|
design.cpp
|
|
error.cpp
|
|
fields.cpp
|
|
header_parser.cpp
|
|
message.cpp
|
|
message_parser.cpp
|
|
read.cpp
|
|
reason.cpp
|
|
rfc7230.cpp
|
|
streambuf_body.cpp
|
|
string_body.cpp
|
|
write.cpp
|
|
chunk_encode.cpp
|
|
)
|
|
|
|
if (NOT WIN32)
|
|
target_link_libraries(http-tests ${Boost_LIBRARIES} Threads::Threads)
|
|
else()
|
|
target_link_libraries(http-tests ${Boost_LIBRARIES})
|
|
endif()
|
|
|
|
add_executable (bench-tests
|
|
${BEAST_INCLUDES}
|
|
${EXTRAS_INCLUDES}
|
|
nodejs_parser.hpp
|
|
../../extras/beast/unit_test/main.cpp
|
|
nodejs_parser.cpp
|
|
parser_bench.cpp
|
|
)
|
|
|
|
if (NOT WIN32)
|
|
target_link_libraries(bench-tests ${Boost_LIBRARIES} Threads::Threads)
|
|
else()
|
|
target_link_libraries(bench-tests ${Boost_LIBRARIES})
|
|
endif()
|