| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| 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); | ||
| } | ||
|
|
||
| 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"), | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityCan you separate out this change, (or rebase) to its own pull request?
Sorry, something went wrong.
All reactions
|
||
| container); | ||
| } | ||
|
|
||
| Expand Down | ||
| 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> | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIs this strictly necessary? If so, can you make this a self-contained PR?
Sorry, something went wrong.
All reactions
|
||
| #include <cstddef> | ||
|
|
||
| #ifdef BOOST_NETWORK_ENABLE_HTTPS | ||
| Expand Down | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,38 @@ | ||
| # - Config file for the cppnetlib package | ||
| # It defines the following variables | ||
| # CPPNETLIB_INCLUDE_DIRS - include directories for cppnetlib | ||
| # CPPNETLIB_LIBRARIES - libraries to link against | ||
| # CPPNETLIB_EXECUTABLE - the bar executable | ||
|
|
||
| # Compute paths | ||
| get_filename_component(CPPNETLIB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
| set(CPPNETLIB_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") | ||
|
|
||
| # Our library dependencies (contains definitions for IMPORTED targets) | ||
| if( NOT TARGET cppnetlib-client-connections | ||
| AND NOT TARGET cppnetlib-server-parsers | ||
| AND NOT TARGET cppnetlib-uri | ||
| AND NOT CPPNETLIB_BINARY_DIR) | ||
| include("${CPPNETLIB_CMAKE_DIR}/cppnetlibTargets.cmake") | ||
| # - Config file for the cppnetlib package | ||
| # It defines the following variables targets | ||
| # cppnetlib::cppnetlib - include directories and usage requirements for cppnetlib | ||
| # Libraries and usage requirements^ | ||
| # cppnetlib::uri | ||
| # cppnetlib::server-parsers | ||
| # cppnetlib::client-connections | ||
| # Variables | ||
| # CPPNETLIB_INCLUDE_DIRS - include directories for cppnetlib (empty, usage requirements propageted through libraries) | ||
| # CPPNETLIB_LIBRARIES - libraries to link against | ||
|
|
||
| set(CPP-NETLIB_STATIC_BOOST @CPP-NETLIB_STATIC_BOOST@) | ||
| set(CPP-NETLIB_ENABLE_HTTPS @CPP-NETLIB_ENABLE_HTTPS@) | ||
| set(CPP-NETLIB_STATIC_OPENSSL @CPP-NETLIB_STATIC_OPENSSL@) | ||
|
|
||
| # Use Boost's static libraries | ||
| if (CPP-NETLIB_STATIC_BOOST) | ||
| set(Boost_USE_STATIC_LIBS ON) | ||
| endif() | ||
|
|
||
| # Always use multi-threaded Boost libraries. | ||
| set(Boost_USE_MULTITHREADED ON) | ||
|
|
||
| if (CPP-NETLIB_ENABLE_HTTPS) | ||
| if (CPP-NETLIB_STATIC_OPENSSL) | ||
| set(OPENSSL_USE_STATIC_LIBS TRUE) | ||
| endif() | ||
|
|
||
| find_package(OpenSSL REQUIRED) | ||
| endif() | ||
|
|
||
| # These are IMPORTED targets created by cppnetlibTargets.cmake | ||
| set(CPPNETLIB_LIBRARIES | ||
| cppnetlib-client-connections | ||
| cppnetlib-server-parsers | ||
| cppnetlib-uri) | ||
| #set(CPPNETLIB_EXECUTABLE ...) # maybe the examples? | ||
| find_package(Boost 1.58.0 REQUIRED COMPONENTS system thread regex) | ||
| find_package(Threads) | ||
|
|
||
| include("${CMAKE_CURRENT_LIST_DIR}/cppnetlibTargets.cmake") | ||
|
|
||
| set(CPPNETLIB_INCLUDE_DIRS) | ||
| set(CPPNETLIB_LIBRARIES cppnetlib::client-connections cppnetlib::server-parsers cppnetlib::uri) |
This file was deleted.
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityPlease re-base, as I've just merged a change that addresses this particular issue.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.