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

websocket: properly parse payload format for client connections

This commit is contained in:
Steffen Vogel 2019-01-12 19:06:23 +01:00
parent 373acdec18
commit 9e018fa4a2

View file

@ -405,10 +405,12 @@ int websocket_start(struct node *n)
c->state = WEBSOCKET_CONNECTION_STATE_CONNECTING;
format = strchr(d->info.path, '.');
if (!format)
if (format)
format = format + 1; // remove "."
else
format = "villas.web";
c->format = format_type_lookup(format + 1);
c->format = format_type_lookup(format);
if (!c->format)
return -1;