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

Verify hostname according to rfc2818#455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 7 commits intocpp-netlib:0.11-develfromeakraly:0.11-devel
Oct 13, 2014
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,7 +97,7 @@ struct http_async_connection
resolve_(
resolver_, host(request), port_,
request_strand_.wrap(boost::bind(
&this_type::handle_resolved, this_type::shared_from_this(), port_,
&this_type::handle_resolved, this_type::shared_from_this(),host(request),port_,
get_body, callback, generator, boost::arg<1>(), boost::arg<2>())));
if (timeout_ > 0) {
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
Expand DownExpand Up@@ -128,7 +128,7 @@ struct http_async_connection
is_timedout_ = true;
}

void handle_resolved(boost::uint16_t port, bool get_body,
void handle_resolved(string_type host,boost::uint16_t port, bool get_body,
body_callback_function_type callback,
body_generator_function_type generator,
boost::system::error_code const& ec,
Expand All@@ -140,9 +140,9 @@ struct http_async_connection
resolver_iterator iter = boost::begin(endpoint_range);
asio::ip::tcp::endpoint endpoint(iter->endpoint().address(), port);
delegate_->connect(
endpoint, request_strand_.wrap(boost::bind(
endpoint,host,request_strand_.wrap(boost::bind(
&this_type::handle_connected,
this_type::shared_from_this(), port, get_body, callback,
this_type::shared_from_this(),host,port, get_body, callback,
generator, std::make_pair(++iter, resolver_iterator()),
placeholders::error)));
} else {
Expand All@@ -152,7 +152,7 @@ struct http_async_connection
}
}

void handle_connected(boost::uint16_t port, bool get_body,
void handle_connected(string_type host,boost::uint16_t port, bool get_body,
body_callback_function_type callback,
body_generator_function_type generator,
resolver_iterator_pair endpoint_range,
Expand All@@ -173,9 +173,10 @@ struct http_async_connection
asio::ip::tcp::endpoint endpoint(iter->endpoint().address(), port);
delegate_->connect(
endpoint,
host,
request_strand_.wrap(boost::bind(
&this_type::handle_connected, this_type::shared_from_this(),
port, get_body, callback, generator,
host,port, get_body, callback, generator,
std::make_pair(++iter, resolver_iterator()),
placeholders::error)));
} else {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,7 @@ namespace http {
namespace impl {

struct connection_delegate {
virtual void connect(asio::ip::tcp::endpoint &endpoint,
virtual void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler) = 0;
virtual void write(
asio::streambuf &command_streambuf,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ namespace impl {
struct normal_delegate : connection_delegate {
normal_delegate(asio::io_service &service);

virtual void connect(asio::ip::tcp::endpoint &endpoint,
virtual void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler);
virtual void write(
asio::streambuf &command_streambuf,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ boost::network::http::impl::normal_delegate::normal_delegate(
: service_(service) {}

void boost::network::http::impl::normal_delegate::connect(
asio::ip::tcp::endpoint &endpoint,
asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler) {
socket_.reset(new asio::ip::tcp::socket(service_));
socket_->async_connect(endpoint, handler);
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,7 @@ struct ssl_delegate : connection_delegate,
optional<std::string> certificate_file,
optional<std::string> private_key_file);

virtual void connect(asio::ip::tcp::endpoint &endpoint,
virtual void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler);
virtual void write(
asio::streambuf &command_streambuf,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@ boost::network::http::impl::ssl_delegate::ssl_delegate(
always_verify_peer_(always_verify_peer) {}

void boost::network::http::impl::ssl_delegate::connect(
asio::ip::tcp::endpoint &endpoint,
asio::ip::tcp::endpoint &endpoint, std::string host,
function<void(system::error_code const &)> handler) {
context_.reset(
new asio::ssl::context(service_, asio::ssl::context::sslv23_client));
Expand All@@ -47,6 +47,8 @@ void boost::network::http::impl::ssl_delegate::connect(
boost::asio::ssl::context::pem);
socket_.reset(
new asio::ssl::stream<asio::ip::tcp::socket>(service_, *context_));
if (always_verify_peer_)
socket_->set_verify_callback(boost::asio::ssl::rfc2818_verification(host));
socket_->lowest_layer().async_connect(
endpoint,
::boost::bind(
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp