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:
parent
373acdec18
commit
9e018fa4a2
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue