Commit 297072a6 authored by Gernot Tenchio's avatar Gernot Tenchio Committed by Johannes Schindelin

websockets: Add wspath member to rfbClientRec

Added wspath member to rfbClientRec which holds the
path component of the initial websocket request.
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent b543d486
......@@ -399,6 +399,7 @@ rfbCloseClient(rfbClientPtr cl)
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
if (cl->sslctx)
rfbssl_destroy(cl);
free(cl->wspath);
#endif
#ifndef __MINGW32__
shutdown(cl->sock,SHUT_RDWR);
......
......@@ -180,6 +180,7 @@ webSocketsHandshake(rfbClientPtr cl, char *scheme)
path = line+4;
buf[len-11] = '\0'; /* Trim trailing " HTTP/1.1\r\n" */
cl->webSocketsBase64 = TRUE;
cl->wspath = strdup(path);
/* rfbLog("Got path: %s\n", path); */
} else if ((strncasecmp("host: ", line, min(llen,6))) == 0) {
host = line+6;
......
......@@ -645,6 +645,7 @@ typedef struct _rfbClientRec {
rfbSslCtx *sslctx;
char *wspath; /* Requests path component */
char encodeBuf[UPDATE_BUF_SIZE*2 + 2]; /* UTF-8 could double it + framing */
char decodeBuf[8192]; /* TODO: what makes sense? */
int dblen;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment