Skip to content

Commit 00bd364

Browse files
committed
Fixing initialization order of variables in HTTP/HTTPS async connections.
1 parent 9a8b4aa commit 00bd364

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

boost/network/protocol/http/impl/http_async_connection.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ namespace boost { namespace network { namespace http { namespace impl {
5050
resolve_function resolve,
5151
bool follow_redirect
5252
) :
53+
follow_redirect_(follow_redirect),
5354
resolver_(resolver),
5455
resolve_(resolve),
55-
follow_redirect_(follow_redirect),
5656
request_strand_(new boost::asio::io_service::strand(resolver->get_io_service()))
5757
{}
5858

@@ -303,11 +303,11 @@ namespace boost { namespace network { namespace http { namespace impl {
303303
}
304304
}
305305

306-
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
306+
bool follow_redirect_;
307307
boost::shared_ptr<resolver_type> resolver_;
308308
boost::shared_ptr<boost::asio::ip::tcp::socket> socket_;
309309
resolve_function resolve_;
310-
bool follow_redirect_;
310+
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
311311
string_type command_string_;
312312
string_type method;
313313
};

boost/network/protocol/http/impl/https_async_connection.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ namespace boost { namespace network { namespace http { namespace impl {
3939
bool follow_redirect,
4040
optional<string_type> const & certificate_filename = optional<string_type>()
4141
) :
42+
follow_redirect_(follow_redirect),
4243
resolver_(resolver),
44+
certificate_filename_(certificate_filename),
4345
resolve_(resolve),
44-
follow_redirect_(follow_redirect),
45-
request_strand_(new boost::asio::io_service::strand(resolver->get_io_service())),
46-
certificate_filename_(certificate_filename)
46+
request_strand_(new boost::asio::io_service::strand(resolver->get_io_service()))
4747
{}
4848

4949

@@ -337,13 +337,13 @@ namespace boost { namespace network { namespace http { namespace impl {
337337
}
338338
}
339339

340-
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
340+
bool follow_redirect_;
341341
boost::shared_ptr<resolver_type> resolver_;
342342
optional<string_type> certificate_filename_;
343343
resolve_function resolve_;
344344
boost::shared_ptr<boost::asio::ssl::context> context_;
345345
boost::shared_ptr<boost::asio::ssl::stream<boost::asio::ip::tcp::socket> > socket_;
346-
bool follow_redirect_;
346+
boost::shared_ptr<boost::asio::io_service::strand> request_strand_;
347347
string_type command_string_;
348348
string_type method;
349349
};

0 commit comments

Comments
 (0)