Hook up maxPayloadLength, not for Zlib

This commit is contained in:
Alex Hultman
2018-12-29 13:32:49 +01:00
parent f5583b4a8a
commit 50de2cea89
4 changed files with 13 additions and 8 deletions
+3
View File
@@ -95,6 +95,9 @@ public:
webSocketContext->getExt()->drainHandler = behavior.drain;
webSocketContext->getExt()->closeHandler = behavior.close;
/* Copy settings */
webSocketContext->getExt()->maxPayloadLength = behavior.maxPayloadLength;
return get(pattern, [webSocketContext, this, behavior](auto *res, auto *req) {
/* If we have this header set, it's a websocket */
std::string_view secWebSocketKey = req->getHeader("sec-websocket-key");