No automatic User-Agent in WebSocket

fixes #1935
This commit is contained in:
Richard Hodges
2020-05-04 16:27:48 +02:00
parent 4be7c5aec3
commit 27ce598bad
2 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,14 @@
* Fix async_connect documentation
* Fix assert in websocket
* No automatic User-Agent in WebSocket
Behaviour Changes:
* No automatic User-Agent in WebSocket
Beast websocket streams will no longer automatically set the
User-Agent HTTP header during client handshake. This header is not required
by the WebSocket standard. If this field is required, user code may set it
in the decorator
--------------------------------------------------------------------------------

View File

@@ -30,7 +30,6 @@
#include <boost/beast/core/static_buffer.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/core/detail/clamp.hpp>
#include <boost/beast/version.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/core/empty_value.hpp>
#include <boost/enable_shared_from_this.hpp>
@@ -588,9 +587,6 @@ build_request(
this->build_request_pmd(req);
decorator_opt(req);
decorator(req);
if(! req.count(http::field::user_agent))
req.set(http::field::user_agent,
BOOST_BEAST_VERSION_STRING);
return req;
}