Handle zlib on Ubuntu.

This commit is contained in:
Chunting Gu
2019-03-19 09:57:18 +08:00
parent 5f64f3bb62
commit bc586c3ea0
4 changed files with 13 additions and 5 deletions
+2
View File
@@ -5,6 +5,8 @@ set(EXAMPLE_COMMON_LIBS webcc ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES}
"${CMAKE_THREAD_LIBS_INIT}")
if(WIN32)
set(EXAMPLE_COMMON_LIBS ${EXAMPLE_COMMON_LIBS} zlibstatic crypt32)
else()
set(EXAMPLE_COMMON_LIBS ${EXAMPLE_COMMON_LIBS} ${ZLIB_LIBRARIES})
endif()
if(UNIX)
+3 -2
View File
@@ -78,7 +78,7 @@ void ExampleHttps() {
// "Connection: Close" header in the response.
// Both Google and GitHub support persistent connection but they don't like
// to include "Connection: Keep-Alive" header in the responses.
//
//
// ExampleKeepAlive("http://httpbin.org/get");
// ExampleKeepAlive("https://www.boost.org/LICENSE_1_0.txt");
// ExampleKeepAlive("https://www.google.com");
@@ -117,7 +117,8 @@ int main() {
// Note that the exception handling is mandatory.
try {
ExampleBasic();
// ExampleBasic();
ExampleCompression();
} catch (const Exception& e) {
std::cout << "Exception: " << e.what() << std::endl;