Skip to content

Commit ab84c01

Browse files
author
Dean Michael Berris
committed
Batch of fixes to make everything at least build with clang.
1 parent 045a446 commit ab84c01

File tree

10 files changed

+27
-23
lines changed

10 files changed

+27
-23
lines changed

boost/network/message/modifiers/clear_headers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace boost { namespace network {
2020
template <class Message>
2121
inline void clear_headers(Message const & message, mpl::true_ const &) {
2222
boost::promise<typename Message::headers_container_type> header_promise;
23-
boost::shared_future<typename Message::headers_container_type> headers_future = header_promise.get_future();
23+
boost::shared_future<typename Message::headers_container_type> headers_future(header_promise.get_future());
2424
message.headers(headers_future);
2525
header_promise.set_value(typename Message::headers_container_type());
2626
}

boost/network/protocol/http.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
// Author: Dean Michael Berris
1212
// Date Created: Oct. 08, 2007
1313

14-
#include <boost/network/protocol/http/request.hpp>
1514
#include <boost/network/protocol/http/response.hpp>
15+
#include <boost/network/protocol/http/request.hpp>
1616
#include <boost/network/protocol/http/client.hpp>
1717
#include <boost/network/protocol/http/errors.hpp>
1818

boost/network/protocol/http/client/facade.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9+
#include <boost/network/protocol/http/request.hpp>
10+
#include <boost/network/protocol/http/response.hpp>
11+
912
namespace boost { namespace network { namespace http {
1013

1114
template <class Tag>
@@ -37,7 +40,7 @@ namespace boost { namespace network { namespace http {
3740
}
3841

3942
response const post (request request_, string_type const & content_type, string_type const & body_) {
40-
request_ << body(body_)
43+
request_ << ::boost::network::body(body_)
4144
<< header("Content-Type", content_type)
4245
<< header("Content-Length", boost::lexical_cast<string_type>(body_.size()));
4346
return post(request_);
@@ -56,7 +59,7 @@ namespace boost { namespace network { namespace http {
5659
}
5760

5861
response const put (request request_, string_type const & content_type, string_type const & body_) {
59-
request_ << body(body_)
62+
request_ << ::boost::network::body(body_)
6063
<< header("Content-Type", content_type)
6164
<< header("Content-Length", boost::lexical_cast<string_type>(body_.size()));
6265
return put(request_);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ namespace boost { namespace network { namespace http { namespace impl {
2727
static async_connection_base<Tag,version_major,version_minor> * new_connection(resolve_function resolve, boost::shared_ptr<resolver_type> resolver, bool follow_redirect, bool https) {
2828
if (https) {
2929
#ifdef BOOST_NETWORK_ENABLE_HTTPS
30-
return dynamic_cast<async_connection_base<Tag,version_major,version_minor>*>(new https_async_connection<Tag,version_major,version_minor>(resolve, resolver, follow_redirect));
30+
// FIXME fill this up with the HTTPS implementation.
31+
// return dynamic_cast<async_connection_base<Tag,version_major,version_minor>*>(new https_async_connection<Tag,version_major,version_minor>(resolve, resolver, follow_redirect));
3132
#else
3233
throw std::runtime_error("HTTPS not supported.");
3334
#endif

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ namespace boost { namespace network { namespace http { namespace impl {
6262

6363
virtual response start(request const & request, string_type const & method, bool get_body) {
6464
response temp;
65-
boost::shared_future<string_type> source_future = source_promise.get_future();
65+
boost::shared_future<string_type> source_future(source_promise.get_future());
6666
source(temp, source_future);
67-
boost::shared_future<string_type> destination_future = destination_promise.get_future();
67+
boost::shared_future<string_type> destination_future(destination_promise.get_future());
6868
destination(temp, destination_future);
69-
boost::shared_future<typename headers_container<Tag>::type> headers_future = headers_promise.get_future();
69+
boost::shared_future<typename headers_container<Tag>::type> headers_future(headers_promise.get_future());
7070
headers(temp, headers_future);
71-
boost::shared_future<string_type> body_future = body_promise.get_future();
71+
boost::shared_future<string_type> body_future(body_promise.get_future());
7272
body(temp, body_future);
73-
boost::shared_future<string_type> version_future = version_promise.get_future();
73+
boost::shared_future<string_type> version_future(version_promise.get_future());
7474
version(temp, version_future);
75-
boost::shared_future<boost::uint16_t> status_future = status_promise.get_future();
75+
boost::shared_future<boost::uint16_t> status_future(status_promise.get_future());
7676
status(temp, status_future);
77-
boost::shared_future<string_type> status_message_future = status_message_promise.get_future();
77+
boost::shared_future<string_type> status_message_future(status_message_promise.get_future());
7878
status_message(temp, status_message_future);
7979

8080
if (!get_body) body_promise.set_value(string_type());

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace boost { namespace network { namespace http { namespace impl {
3232

3333
void send_request_impl(string_type const & method, basic_request<Tag> const & request_) {
3434
boost::asio::streambuf request_buffer;
35-
create_request(request_buffer, method, request_);
35+
this->create_request(request_buffer, method, request_);
3636
connection_base::send_request_impl(socket_, method, request_buffer);
3737
}
3838

@@ -83,4 +83,4 @@ namespace boost { namespace network { namespace http { namespace impl {
8383

8484
} // nmaespace boost
8585

86-
#endif // BOOST_NETWORK_PROTOCOL_HTTP_IMPL_HTTP_SYNC_CONNECTION_20100
86+
#endif // BOOST_NETWORK_PROTOCOL_HTTP_IMPL_HTTP_SYNC_CONNECTION_20100

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace boost { namespace network { namespace http { namespace impl {
4242

4343
void send_request_impl(string_type const & method, basic_request<Tag> const & request_) {
4444
boost::asio::streambuf request_buffer;
45-
create_request(request_buffer, method, request_);
45+
this->create_request(request_buffer, method, request_);
4646
connection_base::send_request_impl(socket_, method, request_buffer);
4747
}
4848

boost/network/protocol/http/response.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <boost/network/protocol/http/message/directives/status_message.hpp>
1818
#include <boost/network/protocol/http/message/directives/version.hpp>
1919
#include <boost/network/protocol/http/message/directives/status.hpp>
20+
#include <boost/network/protocol/http/message/directives/uri.hpp>
2021

2122
#include <boost/network/protocol/http/message/modifiers/version.hpp>
2223
#include <boost/network/protocol/http/message/modifiers/status.hpp>

libs/network/test/http_message_test.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
#define BOOST_TEST_MODULE HTTP message test
88
#include <boost/config/warning_disable.hpp>
99
#include <boost/test/unit_test.hpp>
10-
#include <boost/network/protocol/http/request.hpp>
1110
#include <boost/network/protocol/http/response.hpp>
11+
#include <boost/network/protocol/http/request.hpp>
1212
#include <boost/mpl/list.hpp>
13-
// #include <boost/network/protocol/http/traits.hpp>
1413
#include <algorithm>
1514

1615
using namespace boost::network;
@@ -29,7 +28,7 @@ BOOST_FIXTURE_TEST_SUITE(http_message_test_suite, fixtures)
2928

3029
BOOST_AUTO_TEST_CASE_TEMPLATE (request_constructor_test, T, tag_types) {
3130
http::basic_request<T> request("http://boost.org");
32-
typedef http::basic_request<T>::string_type string_type;
31+
typedef typename http::basic_request<T>::string_type string_type;
3332
string_type host = http::host(request);
3433
boost::uint16_t port = http::port(request);
3534
string_type path = http::path(request);
@@ -50,7 +49,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE (request_copy_constructor_test, T, tag_types) {
5049
<< body("Hello, World!")
5150
;
5251
http::basic_request<T> copy(request);
53-
typedef http::basic_request<T>::string_type string_type;
52+
typedef typename http::basic_request<T>::string_type string_type;
5453
string_type orig_host = http::host(request),
5554
copy_host = http::host(copy);
5655
boost::uint16_t orig_port = http::port(request),
@@ -70,7 +69,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE (request_assignment_test, T, tag_types) {
7069
;
7170
http::basic_request<T> copy;
7271
copy = request;
73-
typedef http::basic_request<T>::string_type string_type;
72+
typedef typename http::basic_request<T>::string_type string_type;
7473
string_type orig_host = http::host(request),
7574
copy_host = http::host(copy);
7675
boost::uint16_t orig_port = http::port(request),
@@ -87,7 +86,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE (request_swap_test, T, tag_types) {
8786
boost::network::http::basic_request<T> request("http://boost.org/");
8887
boost::network::http::basic_request<T> other;
8988
swap(other, request); // ADL
90-
typedef http::basic_request<T>::string_type string_type;
89+
typedef typename http::basic_request<T>::string_type string_type;
9190
string_type orig_host = http::host(request),
9291
orig_path = http::path(request),
9392
copy_host = http::host(other),
@@ -146,7 +145,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE (response_assignment_construct_test, T, tag_types)
146145
<< body("The quick brown fox jumps over the lazy dog");
147146
http::basic_response<T> copy;
148147
copy = response;
149-
typedef http::basic_response<T>::string_type string_type;
148+
typedef typename http::basic_response<T>::string_type string_type;
150149
string_type version_orig = version(response)
151150
, version_copy = version(copy);
152151
BOOST_CHECK_EQUAL ( version_orig, version_copy );

libs/network/test/https_localhost_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <boost/config/warning_disable.hpp>
1313
#include <boost/config.hpp>
1414
#include <boost/test/unit_test.hpp>
15-
#include <boost/network.hpp>
15+
#include <boost/network/protocol/http/client.hpp>
1616
#include <boost/cast.hpp>
1717
#include <string>
1818
#include <fstream>

0 commit comments

Comments
 (0)