Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f229d8

Browse files
committed
Merge pull request#1 from cpp-netlib/0.11-devel
0.11 devel
2 parents6afd3a7 +6e090b3 commit6f229d8

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(WIN32ANDNOTCYGWIN)
1717
set(DEF_INSTALL_CMAKE_DIRCMake)
1818
else()
19-
set(DEF_INSTALL_CMAKE_DIRlib/cmake/cppnetlib)
19+
set(DEF_INSTALL_CMAKE_DIR${CMAKE_INSTALL_LIBDIR}/cmake/cppnetlib)
2020
endif()
2121
set(INSTALL_CMAKE_DIR${DEF_INSTALL_CMAKE_DIR}CACHEPATH"Installation directory for CMake files")
2222

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

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

5454
if (CMAKE_BUILD_TYPEMATCHESDebug)

‎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::queryq(resolver_type::protocol_type::v4(),host,
56+
typename resolver_type::queryq(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-
voidtest_expected_parse_fail(constchar *) {}
8079
}
8180

8281
usingnamespaceboost::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
namespacehttp= boost::network::http;
1718
namespaceutils= boost::network::utils;
@@ -142,7 +143,8 @@ struct connection_handler : boost::enable_shared_from_this<connection_handler> {
142143
voidhandle_chunk(std::pair<void *, std::size_t> mmaped_region,off_t offset,
143144
server::connection_ptr connection,
144145
boost::system::error_codeconst &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)

[8]ページ先頭

©2009-2025 Movatter.jp