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

Commit27438f2

Browse files
committed
Deleted some of the traits classes that are not required.
1 parent2bbd030 commit27438f2

File tree

20 files changed

+32
-188
lines changed

20 files changed

+32
-188
lines changed

‎boost/network/message.hpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
#ifndef BOOST_NETWORK_MESSAGE_HPP__
88
#defineBOOST_NETWORK_MESSAGE_HPP__
99

10+
#include<map>
11+
#include<string>
1012
#include<boost/network/detail/directive_base.hpp>
1113
#include<boost/network/detail/wrapper_base.hpp>
12-
#include<boost/network/traits/headers_container.hpp>
1314
#include<boost/utility/enable_if.hpp>
1415

1516
/** message.hpp
@@ -30,7 +31,7 @@ struct basic_message {
3031
public:
3132
typedef Tag tag;
3233

33-
typedeftypename headers_container<Tag>::type headers_container_type;
34+
typedefstd::multimap<std::string, std::string> headers_container_type;
3435
typedeftypename headers_container_type::value_type header_type;
3536
typedef std::string string_type;
3637

‎boost/network/protocol.hpp‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎boost/network/protocol/http/algorithms/linearize.hpp‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include<boost/network/protocol/http/message/wrappers/headers.hpp>
2121
#include<boost/network/protocol/http/message/wrappers/port.hpp>
2222
#include<boost/network/protocol/http/traits/connection_keepalive.hpp>
23-
#include<boost/network/traits/headers_container.hpp>
24-
#include<boost/network/traits/ostringstream.hpp>
2523
#include<boost/optional.hpp>
2624
#include<boost/range/algorithm/copy.hpp>
2725
#include<boost/version.hpp>
@@ -44,7 +42,7 @@ struct linearize_header {
4442

4543
template<classValueType>
4644
string_typeoperator()(ValueType& header) {
47-
typedeftypename ostringstream<Tag>::type output_stream;
45+
typedefstd::ostringstream output_stream;
4846
typedef constants<Tag> consts;
4947
output_stream header_line;
5048
header_line <<name(header) <<consts::colon() <<consts::space()

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

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

9+
#include<istream>
10+
#include<map>
11+
#include<ostream>
12+
#include<stdexcept>
13+
#include<string>
914
#include<boost/config.hpp>
1015
#include<boost/network/protocol/http/message.hpp>
1116
#include<boost/network/protocol/http/request.hpp>
1217
#include<boost/network/protocol/http/client/response.hpp>
13-
#include<boost/network/traits/ostringstream.hpp>
14-
1518
#include<boost/algorithm/string/classification.hpp>
1619
#include<boost/algorithm/string/split.hpp>
17-
#include<istream>
18-
#include<map>
19-
#include<ostream>
20-
#include<stdexcept>
21-
#include<string>
22-
2320
#include<boost/network/protocol/http/client/facade.hpp>
2421
#include<boost/network/protocol/http/client/macros.hpp>
2522
#include<boost/network/protocol/http/client/options.hpp>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#include<boost/network/protocol/http/message/wrappers/uri.hpp>
2727
#include<boost/network/protocol/http/parser/incremental.hpp>
2828
#include<boost/network/protocol/http/traits/delegate_factory.hpp>
29-
#include<boost/network/traits/istream.hpp>
30-
#include<boost/network/traits/ostream_iterator.hpp>
3129
#include<boost/network/version.hpp>
3230
#include<boost/range/algorithm/transform.hpp>
3331
#include<boost/throw_exception.hpp>

‎boost/network/protocol/http/client/connection/async_protocol_handler.hpp‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct http_async_protocol_handler {
6464
destination_promise.get_future());
6565
destination(response_, destination_future);
6666

67-
std::shared_future<typename headers_container<Tag>::type>headers_future(
67+
std::shared_future<std::multimap<string_type, string_type>>headers_future(
6868
headers_promise.get_future());
6969
headers(response_, headers_future);
7070

@@ -88,9 +88,8 @@ struct http_async_protocol_handler {
8888
typedef std::string string_type;
8989
template<classU>
9090
string_typeconstoperator()(Uconst& pair)const {
91-
typedeftypename ostringstream<Tag>::type ostringstream_type;
9291
typedef constants<Tag> constants;
93-
ostringstream_type header_line;
92+
std::ostringstream header_line;
9493
header_line << pair.first <<constants::colon() <<constants::space()
9594
<< pair.second <<constants::crlf();
9695
return header_line.str();
@@ -242,7 +241,7 @@ struct http_async_protocol_handler {
242241
logic::tribool parsed_ok;
243242
response_parser_typeheaders_parser(
244243
response_parser_type::http_header_line_done);
245-
typenameheaders_container<Tag>::type headers;
244+
typenamestd::multimap<string_type, string_type> headers;
246245
std::pair<string_type, string_type> header_pair;
247246
while (!boost::empty(input_range)) {
248247
std::tie(parsed_ok, result_range) = headers_parser.parse_until(
@@ -341,7 +340,7 @@ struct http_async_protocol_handler {
341340
std::promise<string_type> version_promise;
342341
std::promise<std::uint16_t> status_promise;
343342
std::promise<string_type> status_message_promise;
344-
std::promise<typename headers_container<Tag>::type> headers_promise;
343+
std::promise<std::multimap<string_type, string_type>> headers_promise;
345344
std::promise<string_type> source_promise;
346345
std::promise<string_type> destination_promise;
347346
std::promise<string_type> body_promise;

‎boost/network/protocol/http/client/connection/sync_base.hpp‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
#include<asio/write.hpp>
1414
#include<asio/read_until.hpp>
1515
#include<boost/network/protocol/http/traits/resolver_policy.hpp>
16-
#include<boost/network/traits/istringstream.hpp>
17-
#include<boost/network/traits/ostringstream.hpp>
1816
#include<boost/network/protocol/http/response.hpp>
1917

2018
#include<boost/network/protocol/http/client/connection/sync_normal.hpp>
@@ -111,7 +109,7 @@ struct sync_connection_base_impl {
111109
template<classSocket>
112110
voidread_body_normal(Socket& socket_, basic_response<Tag>& response_,
113111
::asio::streambuf& response_buffer,
114-
typename ostringstream<Tag>::type& body_stream) {
112+
std::ostringstream& body_stream) {
115113
// TODO(dberris): review parameter necessity.
116114
(void)response_;
117115

@@ -128,7 +126,7 @@ struct sync_connection_base_impl {
128126
voidread_body_transfer_chunk_encoding(
129127
Socket& socket_, basic_response<Tag>& response_,
130128
::asio::streambuf& response_buffer,
131-
typename ostringstream<Tag>::type& body_stream) {
129+
std::ostringstream& body_stream) {
132130
std::error_code error;
133131
// look for the content-length header
134132
typename headers_range<basic_response<Tag> >::type content_length_range =
@@ -153,7 +151,7 @@ struct sync_connection_base_impl {
153151
{
154152
std::istreamchunk_stream(&response_buffer);
155153
std::getline(chunk_stream, data);
156-
typename istringstream<Tag>::typechunk_size_stream(data);
154+
std::istringstreamchunk_size_stream(data);
157155
chunk_size_stream >> std::hex >> chunk_size;
158156
}
159157
if (chunk_size ==0) {
@@ -212,7 +210,7 @@ struct sync_connection_base_impl {
212210
template<classSocket>
213211
voidread_body(Socket& socket_, basic_response<Tag>& response_,
214212
::asio::streambuf& response_buffer) {
215-
typename ostringstream<Tag>::type body_stream;
213+
std::ostringstream body_stream;
216214
// TODO(dberris): tag dispatch based on whether it's HTTP 1.0 or HTTP 1.1
217215
if (version_major ==1 && version_minor ==0) {
218216
read_body_normal(socket_, response_, response_buffer, body_stream);

‎boost/network/protocol/http/impl/request.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818

1919
#include<cstdint>
20+
#include<vector>
2021
#include<network/uri/uri.hpp>
2122
#include<boost/algorithm/string.hpp>
2223
#include<boost/fusion/container/map.hpp>
@@ -29,7 +30,6 @@
2930
#include<boost/network/protocol/http/message/wrappers/body.hpp>
3031
#include<boost/network/protocol/http/message/wrappers/headers.hpp>
3132
#include<boost/network/support/is_async.hpp>
32-
#include<boost/network/traits/vector.hpp>
3333

3434
namespaceboost {
3535
namespacenetwork {

‎boost/network/protocol/http/impl/response.ipp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#ifndef BOOST_NETWORK_PROTOCOL_HTTP_IMPL_RESPONSE_RESPONSE_IPP
1717
#defineBOOST_NETWORK_PROTOCOL_HTTP_IMPL_RESPONSE_RESPONSE_IPP
1818

19+
#include<vector>
1920
#include<asio/buffer.hpp>
20-
#include<boost/network/traits/vector.hpp>
2121
#include<boost/network/protocol/http/message/header.hpp>
2222
#include<boost/network/protocol/http/tags.hpp>
2323

‎boost/network/protocol/http/message/async_message.hpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
#include<future>
1313
#include<cstdint>
14-
#include<boost/optional.hpp>
15-
16-
// FIXME move this out to a trait
14+
#include<map>
1715
#include<set>
16+
#include<string>
17+
#include<boost/optional.hpp>
1818
#include<boost/network/detail/wrapper_base.hpp>
1919

2020
namespaceboost {
@@ -33,7 +33,7 @@ template <class Tag>
3333
structasync_message {
3434

3535
typedef std::string string_type;
36-
typedeftypename headers_container<Tag>::type headers_container_type;
36+
typedefstd::multimap<std::string, std::string> headers_container_type;
3737
typedeftypename headers_container_type::value_type header_type;
3838

3939
async_message()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp