summaryrefslogtreecommitdiff
path: root/http/websocket.hpp
diff options
context:
space:
mode:
authorMyung Bae <myungbae@us.ibm.com>2024-04-01 17:27:39 +0300
committerEd Tanous <ed@tanous.net>2024-04-02 02:22:31 +0300
commit1873a04f43bb414408d1da9a5a775c05474603d2 (patch)
tree01859da41d4c385874e95fe28f3643049a034609 /http/websocket.hpp
parent4393bdb981d97e8db1d2cf7700a507222f14e08b (diff)
downloadbmcweb-1873a04f43bb414408d1da9a5a775c05474603d2.tar.xz
Reduce multi-level calls of req.req members
Several places access the members of `req` indirectly like `req.req.method()`. This can be simplified as `req.method()` . This would also make the code clearer. Tested: - Compiles - Redfish service validator passes Change-Id: Ie129564ff907cdea7ac224b1e3d80cc0dedfbd7b Signed-off-by: Myung Bae <myungbae@us.ibm.com>
Diffstat (limited to 'http/websocket.hpp')
-rw-r--r--http/websocket.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/http/websocket.hpp b/http/websocket.hpp
index d232c02330..2ef8412886 100644
--- a/http/websocket.hpp
+++ b/http/websocket.hpp
@@ -92,7 +92,8 @@ class ConnectionImpl : public Connection
BMCWEB_LOG_DEBUG("starting connection {}", logPtr(this));
using bf = boost::beast::http::field;
- std::string protocolHeader = req.req[bf::sec_websocket_protocol];
+ std::string protocolHeader{
+ req.getHeaderValue(bf::sec_websocket_protocol)};
ws.set_option(boost::beast::websocket::stream_base::decorator(
[session{session},