Implement more HTTP:C functionality (#7035)
* Implement missing http:c functionality. * More implementation details and cleanup. * Organize code * Disable treat errors as warnings for httplib * Fix defines * Remove pragmas that do nothing and mark as SYSTEM * Make httplib system * Try to fix issue from httplib * Apply suggestions * Fix header ordering * Fix compilation issue * Create and use ctx.CommandID() * Add and use Common::TruncateString * Apply more suggestions * Apply suggestions * Fix compilation * Apply suggestions * Fix format * Revert SplitURL to previous version * Apply suggestions
This commit is contained in:
parent
1acb03b579
commit
897d1fa957
6 changed files with 2102 additions and 629 deletions
8
externals/CMakeLists.txt
vendored
8
externals/CMakeLists.txt
vendored
|
@ -218,7 +218,7 @@ if (NOT OPENSSL_FOUND)
|
|||
set(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "")
|
||||
set(OPENSSLDIR "/etc/ssl/")
|
||||
add_subdirectory(libressl EXCLUDE_FROM_ALL)
|
||||
target_include_directories(ssl INTERFACE ./libressl/include)
|
||||
target_include_directories(ssl SYSTEM INTERFACE ./libressl/include)
|
||||
target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP)
|
||||
get_directory_property(OPENSSL_LIBRARIES
|
||||
DIRECTORY libressl
|
||||
|
@ -230,13 +230,13 @@ add_library(httplib INTERFACE)
|
|||
if(USE_SYSTEM_CPP_HTTPLIB)
|
||||
find_package(CppHttp 0.14.1)
|
||||
if(CppHttp_FOUND)
|
||||
target_link_libraries(httplib INTERFACE cpp-httplib::cpp-httplib)
|
||||
target_link_libraries(httplib SYSTEM INTERFACE cpp-httplib::cpp-httplib)
|
||||
else()
|
||||
message(STATUS "Cpp-httplib not found or not suitable version! Falling back to bundled...")
|
||||
target_include_directories(httplib INTERFACE ./httplib)
|
||||
target_include_directories(httplib SYSTEM INTERFACE ./httplib)
|
||||
endif()
|
||||
else()
|
||||
target_include_directories(httplib INTERFACE ./httplib)
|
||||
target_include_directories(httplib SYSTEM INTERFACE ./httplib)
|
||||
endif()
|
||||
target_compile_options(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT)
|
||||
target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue