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

Commit1657e28

Browse files
committed
Merge pull requestcpp-netlib#43 from deanberris/0.9-devel
0.9 devel
2 parents5b0dc2a +e86a2fe commit1657e28

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
// Copyright 2010 (c) Dean Michael Berris
55
// Copyright 2010 (c) Sinefunc, Inc.
6+
// Copyright 2011 Dean Michael Berris (dberris@google.com).
7+
// Copyright 2011 Google, Inc.
68
// Distributed under the Boost Software License, Version 1.0.
79
// (See accompanying file LICENSE_1_0.txt or copy at
810
// http://www.boost.org/LICENSE_1_0.txt)
@@ -91,13 +93,15 @@ namespace boost { namespace network { namespace http {
9193
destination_ = future;
9294
}
9395

94-
headers_container_typeconstheaders()const {
96+
headers_container_typeconst &headers()const {
97+
if (retrieved_headers_)return *retrieved_headers_;
9598
headers_container_type raw_headers = headers_.get();
9699
raw_headers.insert(added_headers.begin(), added_headers.end());
97100
BOOST_FOREACH(string_typeconst & key, removed_headers) {
98101
raw_headers.erase(key);
99102
}
100-
return raw_headers;
103+
retrieved_headers_ = raw_headers;
104+
return *retrieved_headers_;
101105
}
102106

103107
voidheaders(boost::shared_future<headers_container_type>const & future)const {
@@ -144,6 +148,7 @@ namespace boost { namespace network { namespace http {
144148
mutable headers_container_type added_headers;
145149
mutable std::set<string_type> removed_headers;
146150
mutable boost::shared_future<string_type> body_;
151+
mutable boost::optional<headers_container_type> retrieved_headers_;
147152

148153
friendstructboost::network::http::impl::ready_wrapper<Tag>;
149154
};

‎libs/network/test/http/CMakeLists.txt‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ if (Boost_FOUND)
2323
client_get_test
2424
client_get_different_port_test
2525
client_get_timeout_test
26-
client_localhost_normal_test
26+
# TODO: refactor these so that local servers are no longer necessary
27+
# client_localhost_normal_test
2728
client_get_streaming_test
2829
)
29-
if (OPENSSL_FOUND)
30-
set ( TESTS${TESTS} client_localhost_ssl_test )
31-
endif (OPENSSL_FOUND)
30+
# TODO: refactor these so that local servers are no longer necessary
31+
#if (OPENSSL_FOUND)
32+
# set ( TESTS ${TESTS} client_localhost_ssl_test )
33+
#endif (OPENSSL_FOUND)
3234
foreach (test${TESTS} )
3335
if (${CMAKE_CXX_COMPILER_ID}MATCHES GNU)
3436
set_source_files_properties(${test}.cpp
@@ -42,12 +44,13 @@ if (Boost_FOUND)
4244
endif()
4345
set_target_properties(cpp-netlib-http-${test}
4446
PROPERTIESRUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/tests)
45-
add_test(cpp-netlib-http-${test}
47+
add_test(cpp-netlib-http-${test}
4648
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-http-${test})
4749
endforeach (test)
4850

4951
set ( SERVER_API_TESTS
5052
server_constructor_test
53+
server_async_run_stop_concurrency
5154
)
5255
foreach (test${SERVER_API_TESTS} )
5356
if (${CMAKE_CXX_COMPILER_ID}MATCHES GNU)
@@ -67,7 +70,6 @@ if (Boost_FOUND)
6770
server_hello_world
6871
server_async
6972
server_async_less_copy
70-
server_async_run_stop_concurrency
7173
)
7274
set ( PORT 8000 )
7375
foreach (test${SERVER_TESTS} )

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp