Skip to content

Commit bf60c4e

Browse files
committed
Merge commit 'upstream/0.5-devel' into 0.5-devel
2 parents 21ce21e + c356c16 commit bf60c4e

File tree

5 files changed

+17
-24
lines changed

5 files changed

+17
-24
lines changed

boost/network/uri/http/uri.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace boost { namespace network { namespace uri {
2020

2121
template <>
2222
struct basic_uri<tags::http_default_8bit_tcp_resolve> : uri_base<tags::http_default_8bit_tcp_resolve> {
23-
using uri_base<tags::http_default_8bit_tcp_resolve>::string_type;
23+
typedef uri_base<tags::http_default_8bit_tcp_resolve>::string_type string_type;
2424
using uri_base<tags::http_default_8bit_tcp_resolve>::operator=;
2525
using uri_base<tags::http_default_8bit_tcp_resolve>::swap;
2626

@@ -31,7 +31,7 @@ namespace boost { namespace network { namespace uri {
3131
return parts_.host;
3232
}
3333

34-
uint32_t port() const {
34+
uint16_t port() const {
3535
return parts_.port ? *(parts_.port) :
3636
(boost::iequals(parts_.scheme, string_type("https")) ? 443u : 80u);
3737
}
@@ -61,7 +61,7 @@ namespace boost { namespace network { namespace uri {
6161
}
6262

6363
inline
64-
uint32_t
64+
uint16_t
6565
port(basic_uri<tags::http_default_8bit_tcp_resolve> const & uri) {
6666
return uri.port();
6767
}

libs/network/doc/uri.qbk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ For any HTTP URI, the following expressions must be valid:
7878
[[Expression] [Return Type] [Description]]
7979
[[`user_info(h)`] [S] [Retrieve the user-info part of the HTTP URI.]]
8080
[[`host(h)`] [S] [Retrieve the host part of the HTTP URI.]]
81-
[[`port(h)`] [uint32_t] [Retrieve the port part of the HTTP URI.]]
81+
[[`port(h)`] [uint16_t] [Retrieve the port part of the HTTP URI.]]
8282
[[`path(h)`] [S] [Retrieve the path part of the HTTP URI.]]
8383
[[`query(h)`] [S] [Retrieve the query part of the HTTP URI.]]
8484
[[`fragment(h)`][S] [Retrieve the fragment part of the HTTP URI.]]

libs/network/test/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ if (Boost_FOUND)
1414
add_executable(cpp-netlib-message_transform_test message_transform_test.cpp)
1515
add_executable(cpp-netlib-url_test url_test.cpp)
1616
target_link_libraries(cpp-netlib-hello_world ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_THREAD_LIBRARY} pthread)
17-
target_link_libraries(cpp-netlib-http_1_0_test ${Boost_LIBRARIES} pthread ssl)
18-
target_link_libraries(cpp-netlib-http_1_1_test ${Boost_LIBRARIES} pthread ssl)
19-
target_link_libraries(cpp-netlib-http_message_test ${Boost_LIBRARIES} pthread ssl)
20-
target_link_libraries(cpp-netlib-message_test ${Boost_LIBRARIES} pthread ssl)
21-
target_link_libraries(cpp-netlib-message_transform_test ${Boost_LIBRARIES} pthread ssl)
22-
target_link_libraries(cpp-netlib-http_localhost_tests ${Boost_LIBRARIES} pthread ssl)
23-
target_link_libraries(cpp-netlib-https_localhost_tests ${Boost_LIBRARIES} pthread ssl)
24-
target_link_libraries(cpp-netlib-url_test ${Boost_LIBRARIES} pthread ssl)
17+
target_link_libraries(cpp-netlib-http_1_0_test ${Boost_LIBRARIES} pthread ssl crypto)
18+
target_link_libraries(cpp-netlib-http_1_1_test ${Boost_LIBRARIES} pthread ssl crypto)
19+
target_link_libraries(cpp-netlib-http_message_test ${Boost_LIBRARIES} pthread ssl crypto)
20+
target_link_libraries(cpp-netlib-message_test ${Boost_LIBRARIES} pthread ssl crypto)
21+
target_link_libraries(cpp-netlib-message_transform_test ${Boost_LIBRARIES} pthread ssl crypto)
22+
target_link_libraries(cpp-netlib-http_localhost_tests ${Boost_LIBRARIES} pthread ssl crypto)
23+
target_link_libraries(cpp-netlib-https_localhost_tests ${Boost_LIBRARIES} pthread ssl crypto)
24+
target_link_libraries(cpp-netlib-url_test ${Boost_LIBRARIES} pthread ssl crypto)
2525
set_target_properties(cpp-netlib-hello_world cpp-netlib-http_1_0_test cpp-netlib-http_1_1_test cpp-netlib-message_test cpp-netlib-http_message_test cpp-netlib-message_transform_test cpp-netlib-http_localhost_tests cpp-netlib-https_localhost_tests cpp-netlib-url_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../../../build/tests)
2626
add_test(cpp-netlib-hello_world python httplib_acceptance.py ../../../build/tests/cpp-netlib-hello_world ../../../build/tests/cpp-netlib-hello_world.passed)
2727
add_test(cpp-netlib-http_1_0_test ../../../build/tests/cpp-netlib-http_1_0_test)

libs/network/test/Jamfile.v2

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ project network_test :
2323
<source>/boost//filesystem
2424
<toolset>gcc:<linkflags>-lpthread
2525
<toolset>gcc:<linkflags>-lssl
26+
<toolset>gcc:<linkflags>-lcrypto
2627
<os>cygwin,<toolset>gcc:<define>_WIN32_WINNT=0x0501
2728
<os>cygwin,<toolset>gcc:<define>__USE_W32_SOCKETS
2829
<os>cygwin,<toolset>gcc:<library>ws2_32
@@ -35,21 +36,13 @@ project network_test :
3536
;
3637

3738
unit-test http_localhost_tests : http_localhost_tests.cpp ;
38-
3939
unit-test https_localhost_tests : https_localhost_tests.cpp ;
40-
4140
unit-test message_test : message_test.cpp ;
42-
4341
unit-test message_transform_test : message_transform_test.cpp ;
44-
4542
unit-test http_1_0_test : http_1_0_test.cpp ;
46-
4743
unit-test http_1_1_test : http_1_1_test.cpp ;
48-
4944
unit-test http_message_test : http_message_test.cpp ;
50-
5145
unit-test url_test : url_test.cpp ;
52-
5346
exe hello_world : hello_world.cpp ;
5447

5548
make httplib_acceptance.passed : httplib_acceptance.py hello_world : @python_runner ;

libs/network/test/url_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void http_full_uri_test(Uri instance,
5050
const typename Uri::string_type &rest_,
5151
const typename Uri::string_type &user_info_,
5252
const typename Uri::string_type &host_,
53-
boost::uint32_t port_,
53+
boost::uint16_t port_,
5454
const typename Uri::string_type &path_,
5555
const typename Uri::string_type &query_,
5656
const typename Uri::string_type &fragment_) {
@@ -75,7 +75,7 @@ void http_simple_uri_test(Uri instance,
7575
const typename Uri::string_type &rest_,
7676
const typename Uri::string_type &user_info_,
7777
const typename Uri::string_type &host_,
78-
boost::uint32_t port_,
78+
boost::uint16_t port_,
7979
const typename Uri::string_type &path_,
8080
const typename Uri::string_type &query_,
8181
const typename Uri::string_type &fragment_) {
@@ -95,7 +95,7 @@ template <
9595
>
9696
void https_simple_uri_test(Uri instance,
9797
const typename Uri::string_type &protocol_,
98-
boost::uint32_t port_) {
98+
boost::uint16_t port_) {
9999
using namespace boost::network::uri;
100100

101101
BOOST_CHECK(protocol(instance) == protocol_);
@@ -107,7 +107,7 @@ template <
107107
>
108108
void http_with_port_test(Uri instance,
109109
const typename Uri::string_type &host_,
110-
boost::uint32_t port_) {
110+
boost::uint16_t port_) {
111111
using namespace boost::network::uri;
112112

113113
BOOST_CHECK(host(instance) == host_);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy