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

Commitb5a0f30

Browse files
committed
Merge pull request#631 from glynos/message_refactor
Message refactor
2 parents89f9768 +1e14f3c commitb5a0f30

File tree

38 files changed

+221
-407
lines changed

38 files changed

+221
-407
lines changed

‎README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Modern C++ network programming libraries.
99
..image::https://scan.coverity.com/projects/6714/badge.svg
1010
:target:https://scan.coverity.com/projects/cpp-netlib
1111

12+
..image::https://img.shields.io/badge/license-boost-blue.svg
13+
:target:https://github.com/cpp-netlib/cpp-netlib/blob/master/LICENSE_1_0.txt
14+
1215
Join us on Slack: http://slack.cpp-netlib.org/
1316

1417
Subscribe to the mailing list: https://groups.google.com/forum/#!forum/cpp-netlib

‎boost/network.hpp

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎boost/network/constants.hpp

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,80 +18,75 @@ template <class Tag>
1818
structconstants_narrow {
1919

2020
staticcharconst*crlf() {
21-
staticchar crlf_[] ={'\r','\n',0};
21+
staticchar crlf_[] ="\r\n";
2222
return crlf_;
2323
}
2424

2525
staticcharconst*dot() {
26-
staticchar dot_[] ={'.',0};
26+
staticchar dot_[] =".";
2727
return dot_;
2828
}
2929

3030
staticchardot_char() {return'.'; }
3131

3232
staticcharconst*http_slash() {
33-
staticchar http_slash_[] ={'H','T','T','P','/',0};
33+
staticchar http_slash_[] ="HTTP/";
3434
return http_slash_;
3535
}
3636

3737
staticcharconst*space() {
38-
staticchar space_[] ={'',0};
38+
staticchar space_[] ="";
3939
return space_;
4040
}
4141

4242
staticcharspace_char() {return''; }
4343

4444
staticcharconst*slash() {
45-
staticchar slash_[] ={'/',0};
45+
staticchar slash_[] ="/";
4646
return slash_;
4747
}
4848

4949
staticcharslash_char() {return'/'; }
5050

5151
staticcharconst*host() {
52-
staticchar host_[] ={'H','o','s','t',0};
52+
staticchar host_[] ="Host";
5353
return host_;
5454
}
5555

5656
staticcharconst*colon() {
57-
staticchar colon_[] ={':',0};
57+
staticchar colon_[] =":";
5858
return colon_;
5959
}
6060

6161
staticcharcolon_char() {return':'; }
6262

6363
staticcharconst*accept() {
64-
staticchar accept_[] ={'A','c','c','e','p','t',0};
64+
staticchar accept_[] ="Accept";
6565
return accept_;
6666
}
6767

6868
staticcharconst*default_accept_mime() {
69-
staticchar mime_[] ={'*','/','*',0};
69+
staticchar mime_[] ="*/*";
7070
return mime_;
7171
}
7272

7373
staticcharconst*accept_encoding() {
74-
staticchar accept_encoding_[] = {'A','c','c','e','p','t','-','E',
75-
'n','c','o','d','i','n','g',0};
74+
staticchar accept_encoding_[] ="Accept-Encoding";
7675
return accept_encoding_;
7776
}
7877

7978
staticcharconst*default_accept_encoding() {
80-
staticchar default_accept_encoding_[] = {
81-
'i','d','e','n','t','i','t','y',';','q','=',
82-
'1','.','0',',','','*',';','q','=','0',0};
79+
staticchar default_accept_encoding_[] ="identity;q=1.0, *;q=0";
8380
return default_accept_encoding_;
8481
}
8582

8683
staticcharconst*user_agent() {
87-
staticchar user_agent_[] = {'U','s','e','r','-','A',
88-
'g','e','n','t',0};
84+
staticchar user_agent_[] ="User-Agent";
8985
return user_agent_;
9086
}
9187

9288
staticcharconst*cpp_netlib_slash() {
93-
staticchar cpp_netlib_slash_[] = {'c','p','p','-','n','e',
94-
't','l','i','b','/',0};
89+
staticchar cpp_netlib_slash_[] ="cpp-netlib/";
9590
return cpp_netlib_slash_;
9691
}
9792

@@ -100,13 +95,12 @@ struct constants_narrow {
10095
staticcharhash_char() {return'#'; }
10196

10297
staticcharconst*connection() {
103-
staticchar connection_[] = {'C','o','n','n','e','c',
104-
't','i','o','n',0};
98+
staticchar connection_[] ="Connection";
10599
return connection_;
106100
}
107101

108102
staticcharconst*close() {
109-
staticchar close_[] ={'C','l','o','s','e',0};
103+
staticchar close_[] ="Close";
110104
return close_;
111105
}
112106

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

Lines changed: 0 additions & 13 deletions
This file was deleted.

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

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎boost/network/include/message.hpp

Lines changed: 0 additions & 17 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include<boost/config.hpp>
1010
#include<boost/network/protocol/http/message.hpp>
1111
#include<boost/network/protocol/http/request.hpp>
12-
#include<boost/network/protocol/http/response.hpp>
12+
#include<boost/network/protocol/http/client/response.hpp>
1313
#include<boost/network/traits/ostringstream.hpp>
1414

1515
#include<boost/algorithm/string/classification.hpp>

‎boost/network/protocol/http/client/facade.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,13 @@
1010
#include<memory>
1111
#include<functional>
1212
#include<boost/network/protocol/http/client/pimpl.hpp>
13-
#include<boost/network/protocol/http/request.hpp>
14-
#include<boost/network/protocol/http/response.hpp>
13+
#include<boost/network/protocol/http/client/request.hpp>
14+
#include<boost/network/protocol/http/client/response.hpp>
1515

1616
namespaceboost {
1717
namespacenetwork {
1818
namespacehttp {
1919

20-
template<classTag>
21-
structbasic_request;
22-
23-
template<classTag>
24-
structbasic_response;
25-
2620
template<classTag,unsigned version_major,unsigned version_minor>
2721
classbasic_client_facade {
2822
typedef basic_client_impl<Tag, version_major, version_minor> pimpl_type;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2016 Glyn Matthews.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
#if !defined(BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC)
7+
#defineBOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC
8+
9+
#include<boost/network/protocol/http/impl/request.hpp>
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacehttp {
14+
using client_request = basic_request<tags::http_async_8bit_tcp_resolve>;
15+
}// namespace http
16+
}// namespace network
17+
}// namespace boost
18+
19+
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2016 Glyn Matthews.
2+
// Distributed under the Boost Software License, Version 1.0.
3+
// (See accompanying file LICENSE_1_0.txt or copy at
4+
// http://www.boost.org/LICENSE_1_0.txt)
5+
6+
#if !defined(BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC)
7+
#defineBOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC
8+
9+
#include<boost/network/protocol/http/response.hpp>
10+
11+
namespaceboost {
12+
namespacenetwork {
13+
namespacehttp {
14+
using client_response = basic_response<tags::http_async_8bit_tcp_resolve>;
15+
}// namespace http
16+
}// namespace network
17+
}// namespace boost
18+
19+
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp