summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvncserver/sockets.c1
-rwxr-xr-xlibvncserver/websockets.c1
-rw-r--r--rfb/rfb.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index 1886187..e18ce70 100644
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -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);
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
index 63e2b53..7297339 100755
--- a/libvncserver/websockets.c
+++ b/libvncserver/websockets.c
@@ -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;
diff --git a/rfb/rfb.h b/rfb/rfb.h
index b6fb7c0..9239b35 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -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;