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

Commit03b34d6

Browse files
committed
Merge pull request#448 from glynos/0.11-devel-uri-ipv6
Added better IPv6 parsing to the URI, and cleaned up some warnings.
2 parentsd4070db +bdbd612 commit03b34d6

File tree

7 files changed

+41
-21
lines changed

7 files changed

+41
-21
lines changed

‎boost/network/message/directives/header.hpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ struct header_directive {
5555

5656
template<classMessage>
5757
voidoperator()(Messageconst& msg)const {
58-
typedeftypename Message::headers_container_type::value_type value_type;
5958
directive_impl<Message>::eval(msg, _header_name, _header_value);
6059
}
6160

‎boost/network/message/message_concept.hpp‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ struct Message : DefaultConstructible<M>, CopyConstructible<M>, Assignable<M> {
3434
typedeftypename traits::source<M>::type source_type;
3535
typedeftypename traits::destination<M>::type destination_type;
3636

37-
typedeftypename traits::header_key<M>::type header_key_type;
38-
typedeftypename traits::header_value<M>::type header_value_type;
39-
4037
headers_container_type headers_ =headers(message);
4138
string_type body_ =body(message);
4239
string_type source_ =source(message);

‎boost/network/message/modifiers/remove_header.hpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ struct iequals_pred {
4646
template<classMessage,classKeyType,classTag>
4747
inlinetypename enable_if<is_pod<Tag>,void>::typeremove_header(
4848
Message& message, KeyTypeconst& key, Tag) {
49-
typedeftypename Message::headers_container_type headers;
5049
message.headers.erase(
5150
boost::remove_if(message.headers, iequals_pred<KeyType>(key)),
5251
message.headers.end());

‎boost/network/protocol/http/server/async_connection.hpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ struct async_connection
222222
<<consts::space() << status <<consts::space()
223223
<<status_message(status) <<consts::crlf();
224224
if (!boost::empty(headers)) {
225-
typedeftypename Range::const_iterator iterator;
226225
typedeftypename string<Tag>::type string_type;
227226
boost::transform(headers, std::ostream_iterator<string_type>(stream),
228227
linearize_header<Tag>());

‎boost/network/uri/encode.hpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ template <class InputIterator, class OutputIterator>
126126
OutputIteratorencode(const InputIterator &in_begin,
127127
const InputIterator &in_end,
128128
const OutputIterator &out_begin) {
129-
typedeftypename boost::iterator_value<InputIterator>::type value_type;
130-
131129
InputIterator it = in_begin;
132130
OutputIterator out = out_begin;
133131
while (it != in_end) {

‎boost/network/uri/uri.ipp‎

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,42 @@ struct uri_grammar
8484
ipvfuture %=
8585
qi::lit('v') >> +qi::xdigit >>'.' >> +(unreserved | sub_delims |':');
8686

87-
ipv6address %=
88-
qi::raw[qi::repeat(6)[h16 >>':'] >> ls32 |
89-
"::" >>qi::repeat(5)[h16 >>':'] >> ls32 |
90-
qi::raw[h16] >>"::" >>qi::repeat(4)[h16 >>':'] >> ls32 |
91-
qi::raw[+(*(h16 >>':')) >> h16] >>"::" >>
92-
qi::repeat(3)[h16 >>':'] >> ls32 |
93-
qi::raw[qi::repeat(2)[*(h16 >>':')] >> h16] >>"::" >>
94-
qi::repeat(2)[h16 >>':'] >> ls32 |
95-
qi::raw[qi::repeat(3)[*(h16 >>':')] >> h16] >>"::" >> h16 >>
96-
':' >> ls32 |
97-
qi::raw[qi::repeat(4)[*(h16 >>':')] >> h16] >>"::" >> ls32 |
98-
qi::raw[qi::repeat(5)[*(h16 >>':')] >> h16] >>"::" >> h16 |
99-
qi::raw[qi::repeat(6)[*(h16 >>':')] >> h16] >>"::"];
87+
ipv6address %= qi::raw
88+
[qi::repeat(6)[h16 >>':'] >> ls32 |
89+
"::" >>qi::repeat(5)[h16 >>':'] >> ls32 |
90+
-qi::raw[h16] >>"::" >>qi::repeat(4)[h16 >>':'] >> ls32 |
91+
-qi::raw[h16] >>"::" >>qi::repeat(3)[h16 >>':'] >> ls32 |
92+
-qi::raw[h16] >>"::" >>qi::repeat(2)[h16 >>':'] >> ls32 |
93+
-qi::raw[h16] >>"::" >> h16 >>':' >> ls32 |
94+
-qi::raw[h16] >>"::" >> ls32 | -qi::raw[h16] >>"::" >> h16 |
95+
-qi::raw[h16] >>"::" |
96+
-qi::raw[qi::repeat(1)[(h16 >>':')] >> h16] >>"::" >>
97+
qi::repeat(3)[h16 >>':'] >> ls32 |
98+
-qi::raw[qi::repeat(1)[(h16 >>':')] >> h16] >>"::" >>
99+
qi::repeat(2)[h16 >>':'] >> ls32 |
100+
-qi::raw[qi::repeat(1)[(h16 >>':')] >> h16] >>"::" >> h16 >>
101+
':' >> ls32 |
102+
-qi::raw[qi::repeat(1)[(h16 >>':')] >> h16] >>"::" >> ls32 |
103+
-qi::raw[qi::repeat(1)[(h16 >>':')] >> h16] >>"::" >> h16 |
104+
-qi::raw[qi::repeat(1)[(h16 >>':')] >> h16] >>"::" |
105+
-qi::raw[qi::repeat(2)[(h16 >>':')] >> h16] >>"::" >>
106+
qi::repeat(2)[h16 >>':'] >> ls32 |
107+
-qi::raw[qi::repeat(2)[(h16 >>':')] >> h16] >>"::" >> h16 >>
108+
':' >> ls32 |
109+
-qi::raw[qi::repeat(2)[(h16 >>':')] >> h16] >>"::" >> ls32 |
110+
-qi::raw[qi::repeat(2)[(h16 >>':')] >> h16] >>"::" >> h16 |
111+
-qi::raw[qi::repeat(2)[(h16 >>':')] >> h16] >>"::" |
112+
-qi::raw[qi::repeat(3)[(h16 >>':')] >> h16] >>"::" >> h16 >>
113+
':' >> ls32 |
114+
-qi::raw[qi::repeat(3)[(h16 >>':')] >> h16] >>"::" >> ls32 |
115+
-qi::raw[qi::repeat(3)[(h16 >>':')] >> h16] >>"::" >> h16 |
116+
-qi::raw[qi::repeat(3)[(h16 >>':')] >> h16] >>"::" |
117+
-qi::raw[qi::repeat(4)[(h16 >>':')] >> h16] >>"::" >> ls32 |
118+
-qi::raw[qi::repeat(4)[(h16 >>':')] >> h16] >>"::" >> h16 |
119+
-qi::raw[qi::repeat(4)[(h16 >>':')] >> h16] >>"::" |
120+
-qi::raw[qi::repeat(5)[(h16 >>':')] >> h16] >>"::" >> h16 |
121+
-qi::raw[qi::repeat(5)[(h16 >>':')] >> h16] >>"::" |
122+
-qi::raw[qi::repeat(6)[(h16 >>':')] >> h16] >>"::"];
100123

101124
// ls32 = ( h16 ":" h16 ) / IPv4address
102125
ls32 %= (h16 >>':' >> h16) | ipv4address;

‎libs/network/test/uri/uri_test.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,3 +561,8 @@ BOOST_AUTO_TEST_CASE(issue_364_test) {
561561
uri::schemes::http(instance) <<uri::host("my.awesome.server.com");
562562
BOOST_CHECK_EQUAL("my.awesome.server.com",uri::authority(instance));
563563
}
564+
565+
BOOST_AUTO_TEST_CASE(issue_447_test) {
566+
uri::uriinstance("http://[www.foo.com/");
567+
BOOST_REQUIRE(!uri::valid(instance));
568+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp