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

websockets: add missing slash in destination path

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

View file

@ -236,7 +236,7 @@ int websocket_protocol_cb(struct lws *wsi, enum lws_callback_reasons reason, voi
ret = websocket_connection_init(c);
if (ret) {
websocket_connection_close(c, wsi, LWS_CLOSE_STATUS_POLICY_VIOLATION, "Internal error");
warning("Failed to intialize websocket connection: reason=%d", ret);
warning("Failed to intialize WebSocket connection: reason=%d", ret);
return -1;
}
@ -569,7 +569,7 @@ int websocket_parse(struct vnode *n, json_t *cfg)
d->info.ssl_connection = !strcmp(prot, "https");
d->info.address = strdup(ads);
d->info.path = strdup(path);
d->info.path = strf("/%s", path);
d->info.host = d->info.address;
d->info.origin = d->info.address;
d->info.ietf_version_or_minus_one = -1;