Set version to 39

This commit is contained in:
Vinnie Falco
2017-05-07 17:33:03 -07:00
parent 9f3ec4f0be
commit 8a49eed947
3 changed files with 27 additions and 15 deletions

View File

@@ -1,4 +1,10 @@
1.0.0-b39
Version 39
Beast versions are now identified by a single integer which
is incremented on each merge. The macro BEAST_VERSION
identifies the version number, currently at 39. A version
setting commit will always be at the tip of the master
and develop branches.
* Use beast::string_view alias
* Fixed braced-init error with older gcc

View File

@@ -10,14 +10,19 @@
#include <beast/config.hpp>
// follows http://semver.org
#define BEAST_QUOTE(arg) #arg
#define BEAST_STR(arg) BEAST_QUOTE(arg)
// BEAST_VERSION % 100 is the patch level
// BEAST_VERSION / 100 % 1000 is the minor version
// BEAST_VERSION / 100000 is the major version
//
#define BEAST_VERSION 100000
/** @def BEAST_API_VERSION
#define BEAST_VERSION_STRING "1.0.0-b38"
Identifies the API version of Beast.
This is a simple integer that is incremented by one every time
a set of code changes is merged to the master or develop branch.
*/
#define BEAST_VERSION 39
#define BEAST_VERSION_STRING "Beast/" BEAST_STR(BEAST_VERSION)
#endif

View File

@@ -185,10 +185,11 @@ build_request(detail::sec_ws_key_type& key,
req.fields, config);
}
decorator(req);
// VFALCO Use static_string here
if(! req.fields.exists("User-Agent"))
req.fields.insert("User-Agent",
std::string("Beast/") + BEAST_VERSION_STRING);
{
static_string<20> s(BEAST_VERSION_STRING);
req.fields.insert("User-Agent", s);
}
return req;
}
@@ -203,11 +204,11 @@ build_response(request_type const& req,
[&decorator](response_type& res)
{
decorator(res);
// VFALCO Use static_string here
if(! res.fields.exists("Server"))
res.fields.insert("Server",
std::string("Beast/") +
BEAST_VERSION_STRING);
{
static_string<20> s(BEAST_VERSION_STRING);
res.fields.insert("Server", s);
}
};
auto err =
[&](std::string const& text)