File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
boost/network/protocol/http/message/modifiers Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ #ifndef BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_MODIFIERS_CLEAR_HEADER_HPP_20101128
2
+ #define BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_MODIFIERS_CLEAR_HEADER_HPP_20101128
3
+
4
+ #include < boost/network/protocol/http/support/client_or_server.hpp>
5
+ #include < boost/network/support/is_async.hpp>
6
+ #include < boost/thread/future.hpp>
7
+
8
+ namespace boost { namespace network { namespace http {
9
+
10
+ namespace impl {
11
+
12
+ template <class Tag >
13
+ inline typename enable_if<
14
+ is_client<Tag>
15
+ , void
16
+ >::type
17
+ clear_headers (basic_request<Tag> & request) {
18
+ request.headers (typename basic_request<Tag>::headers_container_type ());
19
+ }
20
+
21
+ } /* impl */
22
+
23
+ template <class Tag >
24
+ inline void clear_headers_impl (basic_request<Tag> & request, tags::client) {
25
+ impl::clear_headers (request);
26
+ }
27
+
28
+ template <class Tag >
29
+ inline void clear_headers_impl (basic_request<Tag> & request, tags::server) {
30
+ typedef typename basic_request<Tag>::headers_container_type headers_container;
31
+ headers_container ().swap (request.headers );
32
+ }
33
+
34
+ template <class Tag >
35
+ inline void clear_headers (basic_request<Tag> & request) {
36
+ clear_headers_impl (request, typename client_or_server<Tag>::type ());
37
+ }
38
+
39
+ } /* http */
40
+
41
+ } /* network */
42
+
43
+ } /* boost */
44
+
45
+ #endif /* BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_MODIFIERS_CLEAR_HEADER_HPP_20101128 */
You can’t perform that action at this time.
0 commit comments