summaryrefslogtreecommitdiff
path: root/http/http_connection.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'http/http_connection.hpp')
-rw-r--r--http/http_connection.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 7b66ac851b..1b85c6b7b4 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -244,10 +244,11 @@ class Connection :
self->completeRequest(thisRes);
});
- if (thisReq.isUpgrade() &&
- boost::iequals(
- thisReq.getHeaderValue(boost::beast::http::field::upgrade),
- "websocket"))
+ if ((thisReq.isUpgrade() &&
+ boost::iequals(
+ thisReq.getHeaderValue(boost::beast::http::field::upgrade),
+ "websocket")) ||
+ (Handler::isSseRoute(*req)))
{
asyncResp->res.setCompleteRequestHandler(
[self(shared_from_this())](crow::Response& thisRes) {