mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
adds websocketpp::USER_AGENT constant
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
|
||||
// Defaults
|
||||
namespace websocketpp {
|
||||
static const std::string USER_AGENT = "WebSocket++/0.2.0dev";
|
||||
|
||||
typedef std::vector<unsigned char> binary_string;
|
||||
typedef boost::shared_ptr<binary_string> binary_string_ptr;
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ void client<endpoint>::connection<connection_type>::write_request() {
|
||||
|
||||
// Unless the user has overridden the user agent, send generic WS++
|
||||
if (m_request.header("User Agent") == "") {
|
||||
m_request.replace_header("User Agent","WebSocket++/2012-03-09");
|
||||
m_request.replace_header("User Agent",USER_AGENT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ void server<endpoint>::connection<connection_type>::write_response() {
|
||||
// TODO: HTTP response
|
||||
}
|
||||
|
||||
m_response.replace_header("Server","WebSocket++/0.2.0");
|
||||
m_response.replace_header("Server",USER_AGENT);
|
||||
|
||||
std::string raw = m_response.raw();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user