From 23090ee36980a50b025807cccb36b7fd649f6d6e Mon Sep 17 00:00:00 2001 From: Chunting Gu Date: Sat, 7 Apr 2018 11:05:14 +0800 Subject: [PATCH] Enable C++11 on GCC; Link boost libs and pthread on GCC. --- CMakeLists.txt | 10 +- compile_commands.json | 157 +++++++++++++++++++++++ src/CMakeLists.txt | 6 +- src/demo/rest/book_client/CMakeLists.txt | 7 +- src/demo/rest/book_server/CMakeLists.txt | 7 +- src/demo/soap/calc_client/CMakeLists.txt | 8 +- src/demo/soap/calc_server/CMakeLists.txt | 7 +- src/gtest/CMakeLists.txt | 4 + src/webcc/CMakeLists.txt | 4 + src/webcc/http_client.cc | 7 +- src/webcc/http_response.cc | 3 +- src/webcc/soap_client.cc | 2 +- 12 files changed, 210 insertions(+), 12 deletions(-) create mode 100644 compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt index f3b7e8c..4d389f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1.0) project(webcc) option(WEBCC_ENABLE_SOAP "Enable SOAP support (need PugiXml)?" ON) @@ -58,12 +58,18 @@ macro(GROUP_SOURCES_BY_DIR source_files) endforeach() endmacro() +# CMake 3.1.0+ +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) + # Boost version: 1.66+ set(Boost_USE_STATIC_LIBS ON) -find_package(Boost) +set(Boost_USE_MULTITHREADED ON) +find_package(Boost 1.66.0 REQUIRED COMPONENTS system thread) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) + message(STATUS ${Boost_LIBRARIES}) endif() include_directories(${PROJECT_SOURCE_DIR}/src) diff --git a/compile_commands.json b/compile_commands.json new file mode 100644 index 0000000..26e2d43 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1,157 @@ +[ +{ + "directory": "/home/adam/github/webcc/build/src/gtest", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/gtest.dir/gtest-all.cc.o -c /home/adam/github/webcc/src/gtest/gtest-all.cc", + "file": "/home/adam/github/webcc/src/gtest/gtest-all.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/gtest", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/gtest.dir/gtest_main.cc.o -c /home/adam/github/webcc/src/gtest/gtest_main.cc", + "file": "/home/adam/github/webcc/src/gtest/gtest_main.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/pugixml", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -o CMakeFiles/pugixml.dir/pugixml.cpp.o -c /home/adam/github/webcc/src/pugixml/pugixml.cpp", + "file": "/home/adam/github/webcc/src/pugixml/pugixml.cpp" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/common.cc.o -c /home/adam/github/webcc/src/webcc/common.cc", + "file": "/home/adam/github/webcc/src/webcc/common.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_client.cc.o -c /home/adam/github/webcc/src/webcc/http_client.cc", + "file": "/home/adam/github/webcc/src/webcc/http_client.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_message.cc.o -c /home/adam/github/webcc/src/webcc/http_message.cc", + "file": "/home/adam/github/webcc/src/webcc/http_message.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_parser.cc.o -c /home/adam/github/webcc/src/webcc/http_parser.cc", + "file": "/home/adam/github/webcc/src/webcc/http_parser.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_request.cc.o -c /home/adam/github/webcc/src/webcc/http_request.cc", + "file": "/home/adam/github/webcc/src/webcc/http_request.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_request_handler.cc.o -c /home/adam/github/webcc/src/webcc/http_request_handler.cc", + "file": "/home/adam/github/webcc/src/webcc/http_request_handler.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_request_parser.cc.o -c /home/adam/github/webcc/src/webcc/http_request_parser.cc", + "file": "/home/adam/github/webcc/src/webcc/http_request_parser.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_response.cc.o -c /home/adam/github/webcc/src/webcc/http_response.cc", + "file": "/home/adam/github/webcc/src/webcc/http_response.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_response_parser.cc.o -c /home/adam/github/webcc/src/webcc/http_response_parser.cc", + "file": "/home/adam/github/webcc/src/webcc/http_response_parser.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_server.cc.o -c /home/adam/github/webcc/src/webcc/http_server.cc", + "file": "/home/adam/github/webcc/src/webcc/http_server.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/http_session.cc.o -c /home/adam/github/webcc/src/webcc/http_session.cc", + "file": "/home/adam/github/webcc/src/webcc/http_session.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/rest_server.cc.o -c /home/adam/github/webcc/src/webcc/rest_server.cc", + "file": "/home/adam/github/webcc/src/webcc/rest_server.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/url.cc.o -c /home/adam/github/webcc/src/webcc/url.cc", + "file": "/home/adam/github/webcc/src/webcc/url.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/utility.cc.o -c /home/adam/github/webcc/src/webcc/utility.cc", + "file": "/home/adam/github/webcc/src/webcc/utility.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/soap_client.cc.o -c /home/adam/github/webcc/src/webcc/soap_client.cc", + "file": "/home/adam/github/webcc/src/webcc/soap_client.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/soap_server.cc.o -c /home/adam/github/webcc/src/webcc/soap_server.cc", + "file": "/home/adam/github/webcc/src/webcc/soap_server.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/soap_message.cc.o -c /home/adam/github/webcc/src/webcc/soap_message.cc", + "file": "/home/adam/github/webcc/src/webcc/soap_message.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/soap_request.cc.o -c /home/adam/github/webcc/src/webcc/soap_request.cc", + "file": "/home/adam/github/webcc/src/webcc/soap_request.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/soap_response.cc.o -c /home/adam/github/webcc/src/webcc/soap_response.cc", + "file": "/home/adam/github/webcc/src/webcc/soap_response.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/webcc", + "command": "/usr/bin/c++ -DBOOST_ASIO_NO_DEPRECATED -DWEBCC_DEBUG_OUTPUT -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/webcc.dir/soap_xml.cc.o -c /home/adam/github/webcc/src/webcc/soap_xml.cc", + "file": "/home/adam/github/webcc/src/webcc/soap_xml.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/soap/calc_client", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/soap_calc_client.dir/calc_client.cc.o -c /home/adam/github/webcc/src/demo/soap/calc_client/calc_client.cc", + "file": "/home/adam/github/webcc/src/demo/soap/calc_client/calc_client.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/soap/calc_client", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/soap_calc_client.dir/main.cc.o -c /home/adam/github/webcc/src/demo/soap/calc_client/main.cc", + "file": "/home/adam/github/webcc/src/demo/soap/calc_client/main.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/soap/calc_server", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/soap_calc_server.dir/calc_service.cc.o -c /home/adam/github/webcc/src/demo/soap/calc_server/calc_service.cc", + "file": "/home/adam/github/webcc/src/demo/soap/calc_server/calc_service.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/soap/calc_server", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/soap_calc_server.dir/main.cc.o -c /home/adam/github/webcc/src/demo/soap/calc_server/main.cc", + "file": "/home/adam/github/webcc/src/demo/soap/calc_server/main.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/rest/book_client", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/rest_book_client.dir/book_client.cc.o -c /home/adam/github/webcc/src/demo/rest/book_client/book_client.cc", + "file": "/home/adam/github/webcc/src/demo/rest/book_client/book_client.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/rest/book_client", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/rest_book_client.dir/main.cc.o -c /home/adam/github/webcc/src/demo/rest/book_client/main.cc", + "file": "/home/adam/github/webcc/src/demo/rest/book_client/main.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/rest/book_server", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/rest_book_server.dir/book_services.cc.o -c /home/adam/github/webcc/src/demo/rest/book_server/book_services.cc", + "file": "/home/adam/github/webcc/src/demo/rest/book_server/book_services.cc" +}, +{ + "directory": "/home/adam/github/webcc/build/src/demo/rest/book_server", + "command": "/usr/bin/c++ -DWEBCC_ENABLE_SOAP -I/home/adam/include -I/home/adam/github/webcc/src -std=c++11 -std=c++11 -o CMakeFiles/rest_book_server.dir/main.cc.o -c /home/adam/github/webcc/src/demo/rest/book_server/main.cc", + "file": "/home/adam/github/webcc/src/demo/rest/book_server/main.cc" +} +] \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 09169fb..5ce4f6d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,7 @@ +if(UNIX) + add_definitions(-std=c++11) +endif() + if(WEBCC_ENABLE_UT) add_subdirectory(gtest) add_subdirectory(webcc_unittest) @@ -16,4 +20,4 @@ if(WEBCC_ENABLE_DEMO) endif() add_subdirectory(demo/rest/book_client) add_subdirectory(demo/rest/book_server) -endif() \ No newline at end of file +endif() diff --git a/src/demo/rest/book_client/CMakeLists.txt b/src/demo/rest/book_client/CMakeLists.txt index a435983..d381c00 100644 --- a/src/demo/rest/book_client/CMakeLists.txt +++ b/src/demo/rest/book_client/CMakeLists.txt @@ -1,5 +1,10 @@ +if(UNIX) + add_definitions(-std=c++11) +endif() + file(GLOB SRCS *.cc *.h) add_executable(rest_book_client ${SRCS}) -target_link_libraries(rest_book_client webcc) +target_link_libraries(rest_book_client webcc ${Boost_LIBRARIES}) +target_link_libraries(rest_book_client "${CMAKE_THREAD_LIBS_INIT}") diff --git a/src/demo/rest/book_server/CMakeLists.txt b/src/demo/rest/book_server/CMakeLists.txt index 457a575..e0bd5ce 100644 --- a/src/demo/rest/book_server/CMakeLists.txt +++ b/src/demo/rest/book_server/CMakeLists.txt @@ -1,5 +1,10 @@ +if(UNIX) + add_definitions(-std=c++11) +endif() + file(GLOB SRCS *.cc *.h) add_executable(rest_book_server ${SRCS}) -target_link_libraries(rest_book_server webcc) +target_link_libraries(rest_book_server webcc ${Boost_LIBRARIES}) +target_link_libraries(rest_book_server "${CMAKE_THREAD_LIBS_INIT}") diff --git a/src/demo/soap/calc_client/CMakeLists.txt b/src/demo/soap/calc_client/CMakeLists.txt index 9f4289b..06f37ef 100644 --- a/src/demo/soap/calc_client/CMakeLists.txt +++ b/src/demo/soap/calc_client/CMakeLists.txt @@ -1,5 +1,11 @@ +if(UNIX) + add_definitions(-std=c++11) +endif() + file(GLOB SRCS *.cc *.h) add_executable(soap_calc_client ${SRCS}) -target_link_libraries(soap_calc_client webcc pugixml) +target_link_libraries(soap_calc_client webcc pugixml ${Boost_LIBRARIES}) +target_link_libraries(soap_calc_client "${CMAKE_THREAD_LIBS_INIT}") + diff --git a/src/demo/soap/calc_server/CMakeLists.txt b/src/demo/soap/calc_server/CMakeLists.txt index b0e0feb..7e4f2ab 100644 --- a/src/demo/soap/calc_server/CMakeLists.txt +++ b/src/demo/soap/calc_server/CMakeLists.txt @@ -1,5 +1,10 @@ +if(UNIX) + add_definitions(-std=c++11) +endif() + file(GLOB SRCS *.cc *.h) add_executable(soap_calc_server ${SRCS}) -target_link_libraries(soap_calc_server webcc pugixml) +target_link_libraries(soap_calc_server webcc pugixml ${Boost_LIBRARIES}) +target_link_libraries(soap_calc_server "${CMAKE_THREAD_LIBS_INIT}") diff --git a/src/gtest/CMakeLists.txt b/src/gtest/CMakeLists.txt index 8f59cc2..57bc2d6 100644 --- a/src/gtest/CMakeLists.txt +++ b/src/gtest/CMakeLists.txt @@ -1,3 +1,7 @@ +if(UNIX) + add_definitions(-std=c++11) +endif() + set(SRCS gtest-all.cc gtest_main.cc diff --git a/src/webcc/CMakeLists.txt b/src/webcc/CMakeLists.txt index 5cde4bd..6f0c2d6 100644 --- a/src/webcc/CMakeLists.txt +++ b/src/webcc/CMakeLists.txt @@ -1,3 +1,7 @@ +if(UNIX) + add_definitions(-std=c++11) +endif() + option(WEBCC_DEBUG_OUTPUT "Enable debug output?" OFF) if(WEBCC_DEBUG_OUTPUT) diff --git a/src/webcc/http_client.cc b/src/webcc/http_client.cc index ed5dd72..9409401 100644 --- a/src/webcc/http_client.cc +++ b/src/webcc/http_client.cc @@ -37,7 +37,7 @@ static void SetTimeout(boost::asio::ip::tcp::socket& socket, #else // POSIX struct timeval tv; - tv.tv_sec = timeout_seconds_; + tv.tv_sec = timeout_seconds; tv.tv_usec = 0; setsockopt(socket.native_handle(), SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); setsockopt(socket.native_handle(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); @@ -107,11 +107,12 @@ Error HttpClient::SendRequest(const HttpRequest& request, size_t length = socket.read_some(boost::asio::buffer(buffer_), ec); if (length == 0 || ec) { +#if defined _WINDOWS if (ec.value() == WSAETIMEDOUT) { return kSocketTimeoutError; - } else { - return kSocketReadError; } +#endif + return kSocketReadError; } #if WEBCC_DEBUG_OUTPUT diff --git a/src/webcc/http_response.cc b/src/webcc/http_response.cc index ef05e9b..3b33b52 100644 --- a/src/webcc/http_response.cc +++ b/src/webcc/http_response.cc @@ -1,4 +1,5 @@ #include "webcc/http_response.h" +#include namespace webcc { @@ -98,7 +99,7 @@ std::vector HttpResponse::ToBuffers() const { if (IsContentLengthValid()) { buffers.push_back(boost::asio::buffer(content_)); } - + return buffers; } diff --git a/src/webcc/soap_client.cc b/src/webcc/soap_client.cc index bf20ffd..ee51def 100644 --- a/src/webcc/soap_client.cc +++ b/src/webcc/soap_client.cc @@ -45,7 +45,7 @@ Error SoapClient::Call(const std::string& operation, http_request.SetHeader(kSoapAction, operation); http_request.set_content(std::move(http_content)); - http_request.MakeStartLine(); + http_request.Build(); HttpResponse http_response;