|
1 | 1 |
|
2 |
| -// Copyright Dean Michael Berris 2008. |
| 2 | +// Copyright 2013 Google, Inc. |
| 3 | +// Copyright 2008 Dean Michael Berris <dberris@google.com> |
3 | 4 | // Distributed under the Boost Software License, Version 1.0.
|
4 |
| -//(See accompanying file LICENSE_1_0.txt or copy at |
5 |
| -//http://www.boost.org/LICENSE_1_0.txt) |
| 5 | +// (See accompanying file LICENSE_1_0.txt or copy at |
| 6 | +// http://www.boost.org/LICENSE_1_0.txt) |
6 | 7 |
|
7 | 8 | #ifndef BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_TRAITS_HEADERS_CONTAINER_IPP
|
8 | 9 | #defineBOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_TRAITS_HEADERS_CONTAINER_IPP
|
9 | 10 |
|
| 11 | +#include<boost/utility/enable_if.hpp> |
10 | 12 | #include<boost/network/traits/headers_container.hpp>
|
11 | 13 | #include<boost/network/protocol/http/tags.hpp>
|
12 | 14 | #include<boost/algorithm/string/case_conv.hpp>
|
13 | 15 | #include<map>
|
14 | 16 | #include<string>
|
15 | 17 |
|
16 |
| -namespaceboost {namespacenetwork { |
17 |
| - |
18 |
| -template<> |
19 |
| -structheaders_container<http::tags::http_default_8bit_tcp_resolve> { |
20 |
| - |
21 |
| -// Moving implementation from original |
22 |
| -// message_traits implementation by |
23 |
| -// Atomic Labs, Inc. |
24 |
| -// -- |
25 |
| -// returns true if str1 < str2 (ignoring case) |
26 |
| -structis_less_ignore_case { |
27 |
| -inlinebooloperator() ( |
28 |
| - string<http::tags::http_default_8bit_tcp_resolve>::typeconst & str1, |
29 |
| - string<http::tags::http_default_8bit_tcp_resolve>::typeconst & str2)const { |
30 |
| -returnto_lower_copy(str1) <to_lower_copy(str2); |
31 |
| - }; |
| 18 | +namespaceboost {namespacenetwork {namespaceimpl { |
| 19 | + |
| 20 | +template<classTag> |
| 21 | +structheaders_container_impl<Tag,typename enable_if<typename Tag::is_client>::type> { |
| 22 | +// Moving implementation from original |
| 23 | +// message_traits implementation by |
| 24 | +// Atomic Labs, Inc. |
| 25 | +// -- |
| 26 | +// returns true if str1 < str2 (ignoring case) |
| 27 | +structis_less_ignore_case { |
| 28 | +inlinebooloperator() ( |
| 29 | + string<http::tags::http_default_8bit_tcp_resolve>::typeconst & str1, |
| 30 | + string<http::tags::http_default_8bit_tcp_resolve>::typeconst & str2)const { |
| 31 | +returnto_lower_copy(str1) <to_lower_copy(str2); |
32 | 32 | };
|
33 |
| - |
34 |
| -typedef std::multimap< |
35 |
| - string<http::tags::http_default_8bit_tcp_resolve>::type, |
36 |
| - string<http::tags::http_default_8bit_tcp_resolve>::type, |
37 |
| - is_less_ignore_case> type; |
38 | 33 | };
|
39 | 34 |
|
40 |
| -}// namespace network |
| 35 | +typedef std::multimap< |
| 36 | + string<http::tags::http_default_8bit_tcp_resolve>::type, |
| 37 | + string<http::tags::http_default_8bit_tcp_resolve>::type, |
| 38 | + is_less_ignore_case> type; |
| 39 | + }; |
41 | 40 |
|
| 41 | +}// namespace impl |
| 42 | +}// namespace network |
42 | 43 | }// namespace boost
|
43 | 44 |
|
44 | 45 | #endif// BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_TRAITS_HEADERS_CONTAINER_IPP
|
|