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

Commit113fc21

Browse files
committed
Merge branch '0.6-devel' of git://github.com/mikhailberis/cpp-netlib into 0.6-devel
2 parentsf317ff7 +4e1d254 commit113fc21

File tree

13 files changed

+555
-453
lines changed

13 files changed

+555
-453
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace boost { namespace network { namespace http {
8787
}
8888

8989
string_typeconstprotocol()const {
90-
return uri_.protocol();
90+
return uri_.scheme();
9191
}
9292

9393
};

‎boost/network/protocol/http/policies/sync_resolver.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include<utility>
1010
#include<boost/asio.hpp>
1111
#include<boost/network/protocol/http/traits/resolver.hpp>
12+
#include<boost/fusion/adapted/std_pair.hpp>
1213

1314
namespaceboost {namespacenetwork {namespacehttp {namespacepolicies {
1415

‎boost/network/uri/basic_uri.hpp

Lines changed: 66 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#ifndef BOOST_NETWORK_URL_BASIC_URL_
22
#defineBOOST_NETWORK_URL_BASIC_URL_
33

4-
// Copyright 2009 Dean Michael Berris.
4+
// Copyright 2009 Dean Michael Berris, Jeroen Habraken.
55
// Distributed under the Boost Software License, Version 1.0.
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9-
#include<boost/fusion/adapted/std_pair.hpp>
109
#include<boost/range.hpp>
1110

1211
#include<boost/network/tags.hpp>
@@ -45,17 +44,38 @@ namespace boost { namespace network { namespace uri {
4544

4645
voidswap(uri_base & other) {
4746
using std::swap;
47+
4848
swap(other.raw_, raw_);
4949
swap(other.parts_, parts_);
5050
swap(other.valid_, valid_);
5151
}
5252

53-
string_typeprotocol()const {
53+
string_typescheme()const {
5454
return parts_.scheme;
5555
}
5656

57-
string_typerest()const {
58-
return parts_.scheme_specific_part;
57+
string_typeuser_info()const {
58+
return parts_.user_info ? *parts_.user_info :string_type();
59+
}
60+
61+
string_typehost()const {
62+
return parts_.host ? *parts_.host :string_type();
63+
}
64+
65+
uint16_tport()const {
66+
return parts_.port ? *parts_.port :0;
67+
}
68+
69+
string_typepath()const {
70+
return parts_.path;
71+
}
72+
73+
string_typequery()const {
74+
return parts_.query ? *parts_.query :string_type();
75+
}
76+
77+
string_typefragment()const {
78+
return parts_.fragment ? *parts_.fragment :string_type();
5979
}
6080

6181
boolvalid()const {
@@ -97,15 +117,50 @@ namespace boost { namespace network { namespace uri {
97117
template<classTag>
98118
inline
99119
typename string<Tag>::type
100-
protocol(basic_uri<Tag>const & uri) {
101-
return uri.protocol();
120+
scheme(basic_uri<Tag>const & uri) {
121+
return uri.scheme();
102122
}
103123

104124
template<classTag>
105-
inline
106-
typename string<Tag>::type
107-
rest(basic_uri<Tag>const & uri) {
108-
return uri.rest();
125+
inline
126+
typename string<Tag>::type
127+
user_info(basic_uri<Tag>const & uri) {
128+
return uri.user_info();
129+
}
130+
131+
template<classTag>
132+
inline
133+
typename string<Tag>::type
134+
host(basic_uri<Tag>const & uri) {
135+
return uri.host();
136+
}
137+
138+
template<classTag>
139+
inline
140+
uint16_t
141+
port(basic_uri<Tag>const & uri) {
142+
return uri.port();
143+
}
144+
145+
template<classTag>
146+
inline
147+
typename string<Tag>::type
148+
path(basic_uri<Tag>const & uri) {
149+
return uri.path();
150+
}
151+
152+
template<classTag>
153+
inline
154+
typename string<Tag>::type
155+
query(basic_uri<Tag>const & uri) {
156+
return uri.query();
157+
}
158+
159+
template<classTag>
160+
inline
161+
typename string<Tag>::type
162+
fragment(basic_uri<Tag>const & uri) {
163+
return uri.fragment();
109164
}
110165

111166
template<classTag>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp