Skip to content

Commit 6f229d8

Browse files
committed
Merge pull request cpp-netlib#1 from cpp-netlib/0.11-devel
0.11 devel
2 parents 6afd3a7 + 6e090b3 commit 6f229d8

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include(GNUInstallDirs)
1616
if(WIN32 AND NOT CYGWIN)
1717
set(DEF_INSTALL_CMAKE_DIR CMake)
1818
else()
19-
set(DEF_INSTALL_CMAKE_DIR lib/cmake/cppnetlib)
19+
set(DEF_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/cppnetlib)
2020
endif()
2121
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files")
2222

@@ -48,7 +48,7 @@ set(CMAKE_VERBOSE_MAKEFILE true)
4848

4949
set(CPPNETLIB_VERSION_MAJOR 0) # MUST bump this whenever we make ABI-incompatible changes
5050
set(CPPNETLIB_VERSION_MINOR 11)
51-
set(CPPNETLIB_VERSION_PATCH 0)
51+
set(CPPNETLIB_VERSION_PATCH 1)
5252
set(CPPNETLIB_VERSION_STRING ${CPPNETLIB_VERSION_MAJOR}.${CPPNETLIB_VERSION_MINOR}.${CPPNETLIB_VERSION_PATCH})
5353

5454
if (CMAKE_BUILD_TYPE MATCHES Debug)

boost/network/protocol/http/client/connection/ssl_delegate.ipp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ void boost::network::http::impl::ssl_delegate::connect(
3434
context_->load_verify_file(*certificate_filename_);
3535
if (verify_path_) context_->add_verify_path(*verify_path_);
3636
} else {
37-
if (always_verify_peer_)
37+
if (always_verify_peer_) {
3838
context_->set_verify_mode(asio::ssl::context::verify_peer);
39+
context_->set_default_verify_paths(); // use openssl default verify paths. uses openssl environment variables SSL_CERT_DIR, SSL_CERT_FILE
40+
}
3941
else
4042
context_->set_verify_mode(asio::ssl::context::verify_none);
4143
}

boost/network/protocol/http/client/options.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ struct client_options {
9595
return *this;
9696
}
9797

98+
client_options& always_verify_peer(bool v) {
99+
always_verify_peer_ = v;
100+
return *this;
101+
}
102+
98103
client_options& timeout(int v) {
99104
timeout_ = v;
100105
return *this;

boost/network/protocol/http/policies/async_resolver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct async_resolver : boost::enable_shared_from_this<async_resolver<Tag> > {
5353
}
5454
}
5555

56-
typename resolver_type::query q(resolver_type::protocol_type::v4(), host,
56+
typename resolver_type::query q(host,
5757
lexical_cast<string_type>(port));
5858
resolver_.async_resolve(q, resolver_strand_->wrap(boost::bind(
5959
&async_resolver<Tag>::handle_resolve,

libs/mime/test/mime-roundtrip.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ void test_roundtrip(const char *fileName) {
7676
BOOST_CHECK_EQUAL(readfile(fileName), from_mime(mp));
7777
}
7878

79-
void test_expected_parse_fail(const char *) {}
8079
}
8180

8281
using namespace boost::unit_test;

libs/network/example/http/fileserver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <sys/fcntl.h>
1313
#include <unistd.h>
1414
#include <iostream>
15+
#include <cassert>
1516

1617
namespace http = boost::network::http;
1718
namespace utils = boost::network::utils;
@@ -142,7 +143,8 @@ struct connection_handler : boost::enable_shared_from_this<connection_handler> {
142143
void handle_chunk(std::pair<void *, std::size_t> mmaped_region, off_t offset,
143144
server::connection_ptr connection,
144145
boost::system::error_code const &ec) {
145-
if (!ec && offset < mmaped_region.second)
146+
assert(offset>=0);
147+
if (!ec && static_cast<std::size_t>(offset) < mmaped_region.second)
146148
send_file(mmaped_region, offset, connection);
147149
}
148150

0 commit comments

Comments
 (0)