Modernize cmake scripts and support MSVC 2017 by anonimal · Pull Request #834 · cpp-netlib/cpp-netlib · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 121 additions & 89 deletions CMakeLists.txt
19 changes: 9 additions & 10 deletions boost/network/protocol/http/server/impl/parsers.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,21 @@ namespace http {
BOOST_NETWORK_INLINE void parse_version(
std::string const& partial_parsed,
std::tuple<std::uint8_t, std::uint8_t>& version_pair) {
using namespace boost::spirit::qi;
parse(partial_parsed.begin(), partial_parsed.end(),
(lit("HTTP/") >> ushort_ >> '.' >> ushort_), version_pair);
boost::spirit::qi::parse(partial_parsed.begin(), partial_parsed.end(),
(boost::spirit::qi::lit("HTTP/") >> boost::spirit::qi::ushort_ >> '.' >> boost::spirit::qi::ushort_), version_pair);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-base, as I've just merged a change that addresses this particular issue.

}

BOOST_NETWORK_INLINE void parse_headers(
std::string const& input, std::vector<request_header_narrow>& container) {
u8_to_u32_iterator<std::string::const_iterator> begin = input.begin(),
end = input.end();
using namespace boost::spirit::qi;
typedef as<boost::spirit::traits::u32_string> as_u32_string;
parse(begin, end,
*(+((alnum | punct) - ':') >> lit(": ") >>
as_u32_string()[+((unicode::alnum | space | punct) - '\r' - '\n')] >>
lit("\r\n")) >>
lit("\r\n"),

using as_u32_string = boost::spirit::qi::as<boost::spirit::traits::u32_string>;
boost::spirit::qi::parse(begin, end,
*(+((boost::spirit::qi::alnum | boost::spirit::qi::punct) - ':') >> boost::spirit::qi::lit(": ") >>
as_u32_string()[+((boost::spirit::qi::unicode::alnum | boost::spirit::qi::space | boost::spirit::qi::punct) - '\r' - '\n')] >>
boost::spirit::qi::lit("\r\n")) >>
boost::spirit::qi::lit("\r\n"),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you separate out this change, (or rebase) to its own pull request?

container);
}

Expand Down
1 change: 1 addition & 0 deletions boost/network/protocol/stream_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/stream_socket_service.hpp>
#include <boost/asio/io_service.hpp>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this strictly necessary? If so, can you make this a self-contained PR?

#include <cstddef>

#ifdef BOOST_NETWORK_ENABLE_HTTPS
Expand Down
58 changes: 36 additions & 22 deletions cppnetlibConfig.cmake.in
11 changes: 0 additions & 11 deletions cppnetlibConfigVersion.cmake.in

This file was deleted.

Loading