diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68e1342..55b814e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1046,7 +1046,6 @@ jobs: with: source-dir: boost-root/libs/${{ steps.patch.outputs.module }} build-dir: __build_root_test__ - build-target: tests run-tests: true generator: ${{ matrix.generator }} generator-toolset: ${{ matrix.generator-toolset }} diff --git a/doc/local-playbook.yml b/doc/local-playbook.yml index e05d35e..9a910ad 100644 --- a/doc/local-playbook.yml +++ b/doc/local-playbook.yml @@ -14,7 +14,7 @@ content: ui: bundle: - url: https://github.com/boostorg/website-v2-docs/releases/download/ui-master/ui-bundle.zip + url: https://github.com/boostorg/website-v2-docs/releases/download/ui-develop/ui-bundle.zip snapshot: true antora: diff --git a/example/client/burl/Jamfile b/example/client/burl/Jamfile index ecbf64d..4cd61d3 100644 --- a/example/client/burl/Jamfile +++ b/example/client/burl/Jamfile @@ -22,7 +22,7 @@ project [ ac.check-library /boost/http_proto//boost_http_proto_zlib : /boost/http_proto//boost_http_proto_zlib : ] /boost/http_io//boost_http_io /boost/program_options//boost_program_options - /boost/scope//scope + /boost/scope//boost_scope /openssl//ssl/shared /openssl//crypto/shared windows:crypt32 diff --git a/example/client/burl/main.cpp b/example/client/burl/main.cpp index 6d56f9b..28c2a9e 100644 --- a/example/client/burl/main.cpp +++ b/example/client/burl/main.cpp @@ -753,7 +753,7 @@ co_main(int argc, char* argv[]) { parser_cfg.apply_gzip_decoder = true; parser_cfg.apply_deflate_decoder = true; - http_proto::zlib::install_service(proto_ctx); + http_proto::zlib::install_inflate_service(proto_ctx); } http_proto::install_parser_service(proto_ctx, parser_cfg); diff --git a/example/client/burl/message.cpp b/example/client/burl/message.cpp index 888fb81..71e6efe 100644 --- a/example/client/burl/message.cpp +++ b/example/client/burl/message.cpp @@ -26,7 +26,7 @@ string_body::string_body(std::string body, std::string content_type) } http_proto::method -string_body::method() const +string_body::method() const noexcept { return http_proto::method::post; } @@ -57,7 +57,7 @@ file_body::file_body(std::string path) } http_proto::method -file_body::method() const +file_body::method() const noexcept { return http_proto::method::put; } @@ -99,7 +99,7 @@ stdin_body::source::on_read(buffers::mutable_buffer mb) } http_proto::method -stdin_body::method() const +stdin_body::method() const noexcept { return http_proto::method::put; } @@ -111,7 +111,7 @@ stdin_body::content_type() const noexcept } boost::optional -stdin_body::content_length() const +stdin_body::content_length() const noexcept { return boost::none; } diff --git a/example/client/burl/message.hpp b/example/client/burl/message.hpp index 119aa27..e21cbec 100644 --- a/example/client/burl/message.hpp +++ b/example/client/burl/message.hpp @@ -29,7 +29,7 @@ class string_body string_body(std::string body, std::string content_type); http_proto::method - method() const; + method() const noexcept; core::string_view content_type() const noexcept; @@ -49,7 +49,7 @@ class file_body file_body(std::string path); http_proto::method - method() const; + method() const noexcept; core::string_view content_type() const noexcept; @@ -72,13 +72,13 @@ class stdin_body }; http_proto::method - method() const; + method() const noexcept; core::string_view content_type() const noexcept; boost::optional - content_length() const; + content_length() const noexcept; source body() const; diff --git a/example/client/burl/multipart_form.cpp b/example/client/burl/multipart_form.cpp index 4a8f28b..1dc59d8 100644 --- a/example/client/burl/multipart_form.cpp +++ b/example/client/burl/multipart_form.cpp @@ -84,7 +84,7 @@ multipart_form::append( } http_proto::method -multipart_form::method() const +multipart_form::method() const noexcept { return http_proto::method::post; } diff --git a/example/client/burl/multipart_form.hpp b/example/client/burl/multipart_form.hpp index 8f12dbe..cd92553 100644 --- a/example/client/burl/multipart_form.hpp +++ b/example/client/burl/multipart_form.hpp @@ -56,7 +56,7 @@ class multipart_form std::vector headers = {}); http_proto::method - method() const; + method() const noexcept; std::string content_type() const; diff --git a/example/client/visit/CMakeLists.txt b/example/client/visit/CMakeLists.txt index e1b905d..bcb79b7 100644 --- a/example/client/visit/CMakeLists.txt +++ b/example/client/visit/CMakeLists.txt @@ -26,8 +26,6 @@ find_package(ZLIB) target_link_libraries(http_io_example_client_visit boost_http_io - boost_program_options - boost_scope OpenSSL::SSL OpenSSL::Crypto) diff --git a/example/client/visit/Jamfile b/example/client/visit/Jamfile index ca74f34..22bd4f8 100644 --- a/example/client/visit/Jamfile +++ b/example/client/visit/Jamfile @@ -19,8 +19,6 @@ project /boost/http_proto//boost_http_proto [ ac.check-library /boost/http_proto//boost_http_proto_zlib : /boost/http_proto//boost_http_proto_zlib : ] /boost/http_io//boost_http_io - /boost/program_options//boost_program_options - /boost/scope//scope /openssl//ssl/shared /openssl//crypto/shared windows:crypt32 diff --git a/example/client/visit/main.cpp b/example/client/visit/main.cpp index dac8773..8268236 100644 --- a/example/client/visit/main.cpp +++ b/example/client/visit/main.cpp @@ -61,7 +61,7 @@ struct worker do_resolve() { resolver.async_resolve( - url.encoded_host(), + boost::core::string_view(url.encoded_host()), url.scheme(), [&]( boost::system::error_code ec, diff --git a/example/server/main.cpp b/example/server/main.cpp index 951fcbd..cadf680 100644 --- a/example/server/main.cpp +++ b/example/server/main.cpp @@ -189,7 +189,7 @@ make_error_response( if(code == http_proto::status::not_found) { s += "

The requested URL "; - s += req.target_text(); + s += req.target(); s += " was not found on this server.

\n"; } s += "
\n"; @@ -241,16 +241,16 @@ handle_request( #endif // Request path must be absolute and not contain "..". - if( req.target_text().empty() || - req.target_text()[0] != '/' || - req.target_text().find("..") != core::string_view::npos) + if( req.target().empty() || + req.target()[0] != '/' || + req.target().find("..") != core::string_view::npos) return make_error_response( http_proto::status::bad_request, req, res, sr); // Build the path to the requested file std::string path; - path_cat(path, doc_root, req.target_text()); - if(req.target_text().back() == '/') + path_cat(path, doc_root, req.target()); + if(req.target().back() == '/') path.append("index.html"); // Attempt to open the file diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 002881d..088d7df 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -8,8 +8,9 @@ # set(EXTRAFILES - ../../../url/extra/test_main.cpp - ../../../url/extra/test_suite.hpp + ../../../url/extra/test_suite/test_main.cpp + ../../../url/extra/test_suite/test_suite.cpp + ../../../url/extra/test_suite/test_suite.hpp ) file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp) @@ -22,7 +23,7 @@ find_package(OpenSSL REQUIRED) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) source_group("_extra" FILES ${EXTRAFILES}) add_executable(boost_http_io_tests ${PFILES} ${EXTRAFILES}) -target_include_directories(boost_http_io_tests PRIVATE . ../../../url/extra) +target_include_directories(boost_http_io_tests PRIVATE . ../../../url/extra/test_suite) target_link_libraries(boost_http_io_tests PRIVATE OpenSSL::SSL boost_beast diff --git a/test/unit/Jamfile b/test/unit/Jamfile index 1365d16..2efe361 100644 --- a/test/unit/Jamfile +++ b/test/unit/Jamfile @@ -19,9 +19,10 @@ project /boost/beast//boost_beast/off [ ac.check-library /openssl//ssl/off : /openssl//ssl/off : ] [ ac.check-library /boost/http_proto//boost_http_proto_zlib/off : /boost/http_proto//boost_http_proto_zlib/off : ] - ../../../url/extra/test_main.cpp + ../../../url/extra/test_suite/test_main.cpp + ../../../url/extra/test_suite/test_suite.cpp . - ../../../url/extra + ../../../url/extra/test_suite extra on darwin,norecover:static