Skip to content

Commit 38492e8

Browse files
committed
Bugfixes for issue reported here: http://bit.ly/ZMwqla + namespacing for status constants
1 parent 2028c55 commit 38492e8

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ struct http_async_connection
322322
// this can be used as a signaling mechanism for the user to
323323
// determine that the body is now ready for processing, even
324324
// though the callback is already provided.
325-
this->body_promise.set_value("");
325+
//this->body_promise.set_value("");
326326

327327
// The invocation of the callback is synchronous to allow us
328328
// to

boost/network/protocol/http/traits/impl/response_code.ipp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ namespace http {
2323
*/
2424
template <class Tag>
2525
struct response_code {
26-
static boost::uint16_t const OK = 200u;
27-
static boost::uint16_t const CREATED = 201u;
28-
static boost::uint16_t const NO_CONTENT = 204u;
29-
static boost::uint16_t const UNAUTHORIZED = 401u;
30-
static boost::uint16_t const FORBIDDEN = 403u;
31-
static boost::uint16_t const NOT_FOUND = 404u;
32-
static boost::uint16_t const METHOD_NOT_ALLOWED = 405u;
33-
static boost::uint16_t const NOT_MODIFIED = 304u;
34-
static boost::uint16_t const BAD_REQUEST = 400u;
35-
static boost::uint16_t const SERVER_ERROR = 500u;
36-
static boost::uint16_t const NOT_IMPLEMENTED = 501u;
26+
static boost::uint16_t const RC_OK = 200u;
27+
static boost::uint16_t const RC_CREATED = 201u;
28+
static boost::uint16_t const RC_NO_CONTENT = 204u;
29+
static boost::uint16_t const RC_UNAUTHORIZED = 401u;
30+
static boost::uint16_t const RC_FORBIDDEN = 403u;
31+
static boost::uint16_t const RC_NOT_FOUND = 404u;
32+
static boost::uint16_t const RC_METHOD_NOT_ALLOWED = 405u;
33+
static boost::uint16_t const RC_NOT_MODIFIED = 304u;
34+
static boost::uint16_t const RC_BAD_REQUEST = 400u;
35+
static boost::uint16_t const RC_SERVER_ERROR = 500u;
36+
static boost::uint16_t const RC_NOT_IMPLEMENTED = 501u;
3737
};
3838

3939
} // namespace http

boost/network/protocol/http/traits/impl/response_message.ipp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,58 @@ namespace http {
1616
template <>
1717
struct response_message<tags::http_default_8bit_tcp_resolve> {
1818
static char const* ok() {
19-
static char const* const OK = "OK";
20-
return OK;
19+
static char const* const RC_OK = "OK";
20+
return RC_OK;
2121
};
2222

2323
static char const* created() {
24-
static char const* const CREATED = "Created";
25-
return CREATED;
24+
static char const* const RC_CREATED = "Created";
25+
return RC_CREATED;
2626
};
2727

2828
static char const* no_content() {
29-
static char const* const NO_CONTENT = "NO Content";
30-
return NO_CONTENT;
29+
static char const* const RC_NO_CONTENT = "NO Content";
30+
return RC_NO_CONTENT;
3131
};
3232

3333
static char const* unauthorized() {
34-
static char const* const UNAUTHORIZED = "Unauthorized";
35-
return UNAUTHORIZED;
34+
static char const* const RC_UNAUTHORIZED = "Unauthorized";
35+
return RC_UNAUTHORIZED;
3636
};
3737

3838
static char const* forbidden() {
39-
static char const* const FORBIDDEN = "Fobidden";
40-
return FORBIDDEN;
39+
static char const* const RC_FORBIDDEN = "Fobidden";
40+
return RC_FORBIDDEN;
4141
};
4242

4343
static char const* not_found() {
44-
static char const* const NOT_FOUND = "Not Found";
45-
return NOT_FOUND;
44+
static char const* const RC_NOT_FOUND = "Not Found";
45+
return RC_NOT_FOUND;
4646
};
4747

4848
static char const* method_not_allowed() {
49-
static char const* const METHOD_NOT_ALLOWED = "Method Not Allowed";
50-
return METHOD_NOT_ALLOWED;
49+
static char const* const RC_METHOD_NOT_ALLOWED = "Method Not Allowed";
50+
return RC_METHOD_NOT_ALLOWED;
5151
};
5252

5353
static char const* not_modified() {
54-
static char const* const NOT_MODIFIED = "Not Modified";
55-
return NOT_MODIFIED;
54+
static char const* const RC_NOT_MODIFIED = "Not Modified";
55+
return RC_NOT_MODIFIED;
5656
};
5757

5858
static char const* bad_request() {
59-
static char const* const BAD_REQUEST = "Bad Request";
60-
return BAD_REQUEST;
59+
static char const* const RC_BAD_REQUEST = "Bad Request";
60+
return RC_BAD_REQUEST;
6161
};
6262

6363
static char const* server_error() {
64-
static char const* const SERVER_ERROR = "Server Error";
65-
return SERVER_ERROR;
64+
static char const* const RC_SERVER_ERROR = "Server Error";
65+
return RC_SERVER_ERROR;
6666
};
6767

6868
static char const* not_implemented() {
69-
static char const* const NOT_IMPLEMENTED = "Not Implemented";
70-
return NOT_IMPLEMENTED;
69+
static char const* const RC_NOT_IMPLEMENTED = "Not Implemented";
70+
return RC_NOT_IMPLEMENTED;
7171
};
7272
};
7373

0 commit comments

Comments
 (0)