1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

relay: strip leading slash from session id

This commit is contained in:
Steffen Vogel 2020-09-30 16:07:07 +02:00
parent 925a315ca5
commit 86773a83bb

View file

@ -81,10 +81,10 @@ RelaySession * RelaySession::get(lws *wsi)
/* Get path of incoming request */
lws_hdr_copy(wsi, uri, sizeof(uri), WSI_TOKEN_GET_URI);
if (strlen(uri) <= 0)
if (strlen(uri) <= 1)
throw InvalidUrlException();
Identifier sid = uri;
Identifier sid = uri + 1;
auto it = sessions.find(sid);
if (it == sessions.end()) {