Add MockedEchoServer fuzz target, fix App capture of moving this

This commit is contained in:
Alex Hultman
2019-06-16 12:53:19 +02:00
parent 48cca47c63
commit c102034870
4 changed files with 131 additions and 24 deletions
+2 -1
View File
@@ -135,7 +135,8 @@ public:
webSocketContext->getExt()->maxPayloadLength = behavior.maxPayloadLength;
webSocketContext->getExt()->idleTimeout = behavior.idleTimeout;
return std::move(get(pattern, [webSocketContext, this, behavior = std::move(behavior)](auto *res, auto *req) mutable {
return std::move(get(pattern, [webSocketContext, httpContext = this->httpContext, behavior = std::move(behavior)](auto *res, auto *req) mutable {
/* If we have this header set, it's a websocket */
std::string_view secWebSocketKey = req->getHeader("sec-websocket-key");
if (secWebSocketKey.length() == 24) {