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

Commit28e523f

Browse files
committed
Fixes to the linearize implementation, and the request include header.
1 parent3049355 commit28e523f

File tree

5 files changed

+37
-19
lines changed

5 files changed

+37
-19
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
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/traits/string.hpp>
910
#include<boost/network/protocol/http/message/header/name.hpp>
1011
#include<boost/network/protocol/http/message/header/value.hpp>
1112
#include<boost/network/protocol/http/message/header_concept.hpp>
1213
#include<boost/network/constants.hpp>
13-
#include<boost/concept_check.hpp>
14+
#include<boost/concept/requires.hpp>
1415
#include<boost/range/algorithm/copy.hpp>
1516

1617
namespaceboost {namespacenetwork {namespacehttp {
@@ -89,7 +90,7 @@ namespace boost { namespace network { namespace http {
8990
*oi =consts::colon_char();
9091
*oi =consts::space_char();
9192
boost::copy(request.host(), oi);
92-
boost::copy(host, oi);
93+
boost::copy(crlf, oi);
9394
boost::copy(accept, oi);
9495
*oi =consts::colon_char();
9596
*oi =consts::space_char();

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

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#define__NETWORK_PROTOCOL_HTTP_REQUEST_IMPL_20070908_1_HPP__
1010

1111
#include<boost/network/protocol/http/message.hpp>
12+
#include<boost/network/protocol/http/message/header.hpp>
1213

1314
#include<boost/fusion/container/map.hpp>
1415
#include<boost/fusion/sequence/intrinsic/at_key.hpp>
@@ -23,7 +24,20 @@
2324

2425
#include<boost/cstdint.hpp>
2526

26-
namespaceboost {namespacenetwork {namespacehttp {
27+
namespaceboost {namespacenetwork {
28+
29+
/** Specialize the traits for the http_server tag.*/
30+
template<>
31+
structheaders_container<http::tags::http_server> :
32+
vector<http::tags::http_server>::apply<http::request_header<http::tags::http_server> >
33+
{};
34+
35+
template<>
36+
structheaders_container<http::tags::http_async_server> :
37+
vector<http::tags::http_async_server>::apply<http::request_header<http::tags::http_async_server> >
38+
{};
39+
40+
namespacehttp {
2741

2842
/** request.hpp
2943
*
@@ -123,7 +137,7 @@ namespace boost { namespace network { namespace http {
123137
typedef Tag tag;
124138
typedeftypename string<Tag>::type string_type;
125139
typedef request_header<Tag> header_type;
126-
typedeftypename vector<tags::http_server>::
140+
typedeftypename vector<Tag>::
127141
templateapply<header_type>::type
128142
vector_type;
129143
typedef vector_type headers_container_type;
@@ -171,17 +185,6 @@ namespace boost { namespace network { namespace http {
171185

172186
}// namespace http
173187

174-
/** Specialize the traits for the http_server tag.*/
175-
template<>
176-
structheaders_container<http::tags::http_server> :
177-
vector<http::tags::http_server>::apply<http::request_header<http::tags::http_server> >
178-
{};
179-
180-
template<>
181-
structheaders_container<http::tags::http_async_server> :
182-
vector<http::tags::http_async_server>::apply<http::request_header<http::tags::http_async_server> >
183-
{};
184-
185188
namespacehttp {namespaceimpl {
186189

187190
template<>

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,20 @@
2727
#include<boost/network/protocol/http/message/wrappers/body.hpp>
2828
#include<boost/network/protocol/http/message/wrappers/version.hpp>
2929
#include<boost/network/protocol/http/message/wrappers/method.hpp>
30-
#include<boost/network/protocol/http/message/modifiers/method.hpp>
3130
#include<boost/network/protocol/http/message/directives/method.hpp>
3231
#include<boost/network/protocol/http/message/directives/major_version.hpp>
3332
#include<boost/network/protocol/http/message/directives/minor_version.hpp>
33+
#include<boost/network/protocol/http/message/modifiers/method.hpp>
3434
#include<boost/network/protocol/http/message/modifiers/major_version.hpp>
3535
#include<boost/network/protocol/http/message/modifiers/minor_version.hpp>
36+
#include<boost/network/protocol/http/message/modifiers/source.hpp>
37+
#include<boost/network/protocol/http/message/modifiers/destination.hpp>
38+
#include<boost/network/protocol/http/message/modifiers/headers.hpp>
39+
#include<boost/network/protocol/http/message/modifiers/body.hpp>
3640
#include<boost/network/protocol/http/message/wrappers/major_version.hpp>
3741
#include<boost/network/protocol/http/message/wrappers/minor_version.hpp>
42+
#include<boost/network/protocol/http/message/wrappers/source.hpp>
43+
#include<boost/network/protocol/http/message/wrappers/destination.hpp>
3844

3945
#include<boost/network/message/directives.hpp>
4046
#include<boost/network/message/transformers.hpp>

‎boost/network/traits/vector.hpp‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
#ifndef BOOST_NETWORK_TRAITS_VECTOR_HPP
77
#defineBOOST_NETWORK_TRAITS_VECTOR_HPP
88

9+
#include<boost/network/support/is_default_string.hpp>
10+
#include<vector>
11+
912
namespaceboost {namespacenetwork {
1013

1114
template<classTag>
@@ -15,9 +18,13 @@ namespace boost { namespace network {
1518
structvector {
1619

1720
template<classType>
18-
structapply {
19-
typedef unsupported_tag<Tag> type;
20-
};
21+
structapply :
22+
mpl::if_<
23+
is_default_string<Tag>
24+
, std::vector<Type>
25+
, unsupported_tag<Tag>
26+
>
27+
{};
2128

2229
};
2330

‎libs/network/test/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if (Boost_FOUND)
3030
http_url_test
3131
utils_thread_pool
3232
http_async_message_ready
33+
http_request_linearize
3334
)
3435
foreach (test${TESTS})
3536
set_source_files_properties(${test}.cpp

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp