Skip to content

Commit c3db303

Browse files
committed
Copy the host name to avoid a dangling reference to a temporary request object.
fixes #482
1 parent 8c9346e commit c3db303

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct http_async_connection
9797
resolve_(
9898
resolver_, host(request), port_,
9999
request_strand_.wrap(boost::bind(
100-
&this_type::handle_resolved, this_type::shared_from_this(), host(request), port_,
100+
&this_type::handle_resolved, this_type::shared_from_this(), string_type(host(request)), port_,
101101
get_body, callback, generator, boost::arg<1>(), boost::arg<2>())));
102102
if (timeout_ > 0) {
103103
timer_.expires_from_now(boost::posix_time::seconds(timeout_));

0 commit comments

Comments
 (0)