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

Commit10244c6

Browse files
committed
Merge branch 'http-client-refactoring'
2 parents64dd8cc +a0f68a7 commit10244c6

File tree

281 files changed

+10041
-8611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+10041
-8611
lines changed

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ Testing
88
*.gch
99
libs/mime/test/mime-roundtrip
1010
*.a
11+
bin/
12+
tests/
1113
_build

‎boost/network/constants.hpp‎

Lines changed: 25 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -6,151 +6,33 @@
66
// (See accompanying file LICENSE_1_0.txt or copy at
77
// http://www.boost.org/LICENSE_1_0.txt)
88

9-
#include<boost/network/support/is_default_string.hpp>
10-
#include<boost/network/support/is_default_wstring.hpp>
11-
#include<boost/mpl/if.hpp>
12-
139
namespaceboost {namespacenetwork {
1410

15-
namespaceimpl {
16-
template<classTag>
17-
structconstants_narrow {
18-
19-
staticcharconst *crlf() {
20-
staticchar crlf_[] = {'\r','\n',0 };
21-
return crlf_;
22-
}
23-
24-
staticcharconst *dot() {
25-
staticchar dot_[] = {'.',0 };
26-
return dot_;
27-
}
28-
29-
staticchardot_char() {return'.'; }
30-
31-
staticcharconst *http_slash() {
32-
staticchar http_slash_[] = {'H','T','T','P','/',0 };
33-
return http_slash_;
34-
}
35-
36-
staticcharconst *space() {
37-
staticchar space_[] = {'',0};
38-
return space_;
39-
}
40-
41-
staticcharspace_char() {return''; }
42-
43-
staticcharconst *slash() {
44-
staticchar slash_[] = {'/',0};
45-
return slash_;
46-
}
47-
48-
staticcharslash_char() {return'/'; }
49-
50-
staticcharconst *host() {
51-
staticchar host_[] = {'H','o','s','t',0};
52-
return host_;
53-
}
54-
55-
staticcharconst *colon() {
56-
staticchar colon_[] = {':',0};
57-
return colon_;
58-
}
59-
60-
staticcharcolon_char() {return':'; }
61-
62-
staticcharconst *accept() {
63-
staticchar accept_[] = {'A','c','c','e','p','t',0};
64-
return accept_;
65-
}
66-
67-
staticcharconst *default_accept_mime() {
68-
staticchar mime_[] = {
69-
'*','/','*',0
70-
};
71-
return mime_;
72-
}
73-
74-
staticcharconst *accept_encoding() {
75-
staticchar accept_encoding_[] = {
76-
'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',0
77-
};
78-
return accept_encoding_;
79-
}
80-
81-
staticcharconst *default_accept_encoding() {
82-
staticchar default_accept_encoding_[] = {
83-
'i','d','e','n','t','i','t','y',';','q','=','1','.','0',',','','*',';','q','=','0',0
84-
};
85-
return default_accept_encoding_;
86-
}
87-
88-
staticcharconst *user_agent() {
89-
staticchar user_agent_[] = {
90-
'U','s','e','r','-','A','g','e','n','t',0
91-
};
92-
return user_agent_;
93-
}
94-
95-
staticcharconst *cpp_netlib_slash() {
96-
staticchar cpp_netlib_slash_[] = {
97-
'c','p','p','-','n','e','t','l','i','b','/',0
98-
};
99-
return cpp_netlib_slash_;
100-
}
101-
102-
staticcharquestion_mark_char() {
103-
return'?';
104-
}
105-
106-
staticcharhash_char() {
107-
return'#';
108-
}
109-
110-
staticcharconst *connection() {
111-
staticchar connection_[] = {
112-
'C','o','n','n','e','c','t','i','o','n',0
113-
};
114-
return connection_;
115-
}
116-
117-
staticcharconst *close() {
118-
staticchar close_[] = {
119-
'C','l','o','s','e',0
120-
};
121-
return close_;
122-
}
123-
124-
staticcharconst *https() {
125-
staticchar https_[] ="https";
126-
return https_;
127-
}
128-
129-
};
130-
131-
template<classTag>
132-
structconstants_wide {
133-
134-
staticwchar_tconst *https() {
135-
staticwchar_t https_[] =L"https";
136-
return https_;
137-
}
138-
139-
};
140-
}
141-
142-
template<classTag>
143-
structconstants :
144-
mpl::if_<
145-
is_default_string<Tag>,
146-
impl::constants_narrow<Tag>,
147-
typename mpl::if_<
148-
is_default_wstring<Tag>,
149-
impl::constants_wide<Tag>,
150-
unsupported_tag<Tag>
151-
>::type
152-
>::type
153-
{};
11+
structconstants {
12+
staticcharconst *crlf();
13+
staticcharconst *dot();
14+
staticchardot_char();
15+
staticcharconst *http_slash();
16+
staticcharconst *space();
17+
staticcharspace_char();
18+
staticcharconst *slash();
19+
staticcharslash_char();
20+
staticcharconst *host();
21+
staticcharconst *colon();
22+
staticcharcolon_char();
23+
staticcharconst *accept();
24+
staticcharconst *default_accept_mime();
25+
staticcharconst *accept_encoding();
26+
staticcharconst *default_accept_encoding();
27+
staticcharconst *user_agent();
28+
staticcharconst *default_user_agent();
29+
staticcharconst *cpp_netlib_slash();
30+
staticcharquestion_mark_char();
31+
staticcharhash_char();
32+
staticcharconst *connection();
33+
staticcharconst *close();
34+
staticcharconst *https();
35+
};
15436

15537
}// namespace network
15638

‎boost/network/constants.ipp‎

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
#ifndef BOOST_NETWORK_CONSTANTS_HPP_20111008
2+
#defineBOOST_NETWORK_CONSTANTS_HPP_20111008
3+
4+
// Copyright 2011 Dean Michael Berris <dberris@google.com>.
5+
// Copyright 2011 Google, Inc.
6+
// Distributed under the Boost Software License, Version 1.0.
7+
// (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include<boost/network/constants.hpp>
11+
#include<boost/network/version.hpp>
12+
13+
namespaceboost {namespacenetwork {
14+
15+
charconst *constants::crlf() {
16+
staticchar crlf_[] ="\r\n";
17+
return crlf_;
18+
}
19+
20+
charconst *constants::dot() {
21+
staticchar dot_[] =".";
22+
return dot_;
23+
}
24+
25+
charconstants::dot_char() {return'.'; }
26+
27+
charconst *constants::http_slash() {
28+
staticchar http_slash_[] ="HTTP/";
29+
return http_slash_;
30+
}
31+
32+
charconst *constants::space() {
33+
staticchar space_[] = {'',0};
34+
return space_;
35+
}
36+
37+
charconstants::space_char() {return''; }
38+
39+
charconst *constants::slash() {
40+
staticchar slash_[] = {'/',0};
41+
return slash_;
42+
}
43+
44+
charconstants::slash_char() {return'/'; }
45+
46+
charconst *constants::host() {
47+
staticchar host_[] = {'H','o','s','t',0};
48+
return host_;
49+
}
50+
51+
charconst *constants::colon() {
52+
staticchar colon_[] = {':',0};
53+
return colon_;
54+
}
55+
56+
charconstants::colon_char() {return':'; }
57+
58+
charconst *constants::accept() {
59+
staticchar accept_[] = {'A','c','c','e','p','t',0};
60+
return accept_;
61+
}
62+
63+
charconst *constants::default_accept_mime() {
64+
staticchar mime_[] = {
65+
'*','/','*',0
66+
};
67+
return mime_;
68+
}
69+
70+
charconst *constants::accept_encoding() {
71+
staticchar accept_encoding_[] = {
72+
'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',0
73+
};
74+
return accept_encoding_;
75+
}
76+
77+
charconst *constants::default_accept_encoding() {
78+
staticchar default_accept_encoding_[] = {
79+
'i','d','e','n','t','i','t','y',';','q','=','1','.','0',',','','*',';','q','=','0',0
80+
};
81+
return default_accept_encoding_;
82+
}
83+
84+
charconst *constants::user_agent() {
85+
staticchar user_agent_[] = {
86+
'U','s','e','r','-','A','g','e','n','t',0
87+
};
88+
return user_agent_;
89+
}
90+
91+
charconst *constants::cpp_netlib_slash() {
92+
staticchar cpp_netlib_slash_[] = {
93+
'c','p','p','-','n','e','t','l','i','b','/',0
94+
};
95+
return cpp_netlib_slash_;
96+
}
97+
98+
charconstants::question_mark_char() {
99+
return'?';
100+
}
101+
102+
charconstants::hash_char() {
103+
return'#';
104+
}
105+
106+
charconst *constants::connection() {
107+
staticchar connection_[] ="Connection";
108+
return connection_;
109+
}
110+
111+
charconst *constants::close() {
112+
staticchar close_[] ="close";
113+
return close_;
114+
}
115+
116+
charconst *constants::https() {
117+
staticchar https_[] ="https";
118+
return https_;
119+
}
120+
121+
charconst *constants::default_user_agent() {
122+
staticchar user_agent_[] ="cpp-netlib/" BOOST_NETLIB_VERSION;
123+
return user_agent_;
124+
}
125+
126+
}/* network*/
127+
128+
}/* boost*/
129+
130+
#endif/* BOOST_NETWORK_CONSTANTS_HPP_20111008*/

‎boost/network/include/http/client.hpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
// This is the modular include file for using the HTTP Client
1010

1111
#include<boost/network/protocol/http/client.hpp>
12+
#include<boost/network/message/wrappers.hpp>
13+
#include<boost/network/protocol/http/message/directives.hpp>
14+
#include<boost/network/protocol/http/message/modifiers.hpp>
15+
#include<boost/network/protocol/http/message/wrappers.hpp>
16+
#include<boost/network/message/directives.hpp>
17+
#include<boost/network/message/transformers.hpp>
1218

1319
#endif// BOOST_NETWORK_INCLUDE_HTTP_CLIENT_HPP_
1420

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
#ifndef BOOST_NETWORK_INCLUDE_HTTP_SERVER_HPP_
22
#defineBOOST_NETWORK_INCLUDE_HTTP_SERVER_HPP_
33

4-
// Copyright 2010 Dean Michael Berris
4+
// Copyright 2010-2012 Dean Michael Berris <dberris@google.com>.
5+
// Copyright 2012 Google, Inc.
56
// Distributed under the Boost Software License, Version 1.0.
67
// (See accompanying file LICENSE_1_0.txt or copy at
78
// http://www.boost.org/LICENSE_1_0.txt)
89
//
910
// This is the modular include file for using the HTTP Client
1011

12+
#include<boost/asio/io_service.hpp>
1113
#include<boost/network/protocol/http/server.hpp>
14+
#include<boost/network/utils/thread_pool.hpp>
15+
#include<boost/network/detail/debug.hpp>
1216

1317
#endif

‎boost/network/include/message.hpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
//
99
// This is the modular include file for using the basic message type
1010

11-
#include<boost/network/tags.hpp>
1211
#include<boost/network/message.hpp>
1312

1413
#endif// BOOST_NETWORK_INCLUDE_MESSAGE_HPP_

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp