Fixed deprecated calls
This commit is contained in:
parent
4abe349158
commit
26215025c8
5 changed files with 16 additions and 6 deletions
|
|
@ -27,6 +27,12 @@ namespace SimpleWeb {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace SimpleWeb {
|
namespace SimpleWeb {
|
||||||
|
#if (defined(ASIO_STANDALONE) && ASIO_VERSION >= 103300) || BOOST_ASIO_VERSION >= 103300
|
||||||
|
using const_buffer = asio::const_buffer;
|
||||||
|
#else
|
||||||
|
using const_buffer = asio::const_buffers_1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined(ASIO_STANDALONE) && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300
|
#if (defined(ASIO_STANDALONE) && ASIO_VERSION >= 101300) || BOOST_ASIO_VERSION >= 101300
|
||||||
using io_context = asio::io_context;
|
using io_context = asio::io_context;
|
||||||
using resolver_results = asio::ip::tcp::resolver::results_type;
|
using resolver_results = asio::ip::tcp::resolver::results_type;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace SimpleWeb {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Match condition for asio::read_until to match both standard and non-standard HTTP header endings.
|
/// Match condition for asio::read_until to match both standard and non-standard HTTP header endings.
|
||||||
std::pair<asio::buffers_iterator<asio::const_buffers_1>, bool> operator()(asio::buffers_iterator<asio::const_buffers_1> begin, asio::buffers_iterator<asio::const_buffers_1> end) {
|
std::pair<asio::buffers_iterator<const_buffer>, bool> operator()(asio::buffers_iterator<const_buffer> begin, asio::buffers_iterator<const_buffer> end) {
|
||||||
auto it = begin;
|
auto it = begin;
|
||||||
for(; it != end; ++it) {
|
for(; it != end; ++it) {
|
||||||
if(*it == '\n') {
|
if(*it == '\n') {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,11 @@ namespace SimpleWeb {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(verify_certificate)
|
if(verify_certificate)
|
||||||
|
#if (defined(ASIO_STANDALONE) && ASIO_VERSION >= 103300) || BOOST_ASIO_VERSION >= 103300
|
||||||
|
context.set_verify_callback(asio::ssl::host_name_verification(host));
|
||||||
|
#else
|
||||||
context.set_verify_callback(asio::ssl::rfc2818_verification(host));
|
context.set_verify_callback(asio::ssl::rfc2818_verification(host));
|
||||||
|
#endif
|
||||||
|
|
||||||
if(verify_file.size() > 0)
|
if(verify_file.size() > 0)
|
||||||
context.load_verify_file(verify_file);
|
context.load_verify_file(verify_file);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue