summaryrefslogtreecommitdiffstats
path: root/libvncserver/httpd.c
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2011-10-04 18:26:48 +0200
committerChristian Beier <dontmind@freeshell.org>2011-10-04 18:26:48 +0200
commitedbd5ab8d4512a7adb089f3e4791e54523748253 (patch)
treeb6dc74ec651e5a5173fe8d26d67392b35888c65d /libvncserver/httpd.c
parentbffd9ee33bd141f5c75304b1430d2ea2725239b3 (diff)
downloadlibtdevnc-edbd5ab8d4512a7adb089f3e4791e54523748253.tar.gz
libtdevnc-edbd5ab8d4512a7adb089f3e4791e54523748253.zip
Add noVNC HTML5 client connect possibility to our http server.
Pure JavaScript, no Java plugin required anymore! (But a recent browser...)
Diffstat (limited to 'libvncserver/httpd.c')
-rw-r--r--libvncserver/httpd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libvncserver/httpd.c b/libvncserver/httpd.c
index ad2a51b..83fc520 100644
--- a/libvncserver/httpd.c
+++ b/libvncserver/httpd.c
@@ -346,12 +346,6 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
return;
}
- if (strchr(fname+1, '/') != NULL) {
- rfbErr("httpd: asking for file in other directory\n");
- rfbWriteExact(&cl, NOT_FOUND_STR, strlen(NOT_FOUND_STR));
- httpCloseSock(rfbScreen);
- return;
- }
getpeername(rfbScreen->httpSock, (struct sockaddr *)&addr, &addrlen);
rfbLog("httpd: get '%s' for %s\n", fname+1,
@@ -447,6 +441,10 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
sprintf(str, "%d", rfbScreen->port);
rfbWriteExact(&cl, str, strlen(str));
+ } else if (compareAndSkip(&ptr, "$HOST")) {
+
+ rfbWriteExact(&cl, rfbScreen->thisHost, strlen(rfbScreen->thisHost));
+
} else if (compareAndSkip(&ptr, "$DESKTOP")) {
rfbWriteExact(&cl, rfbScreen->desktopName, strlen(rfbScreen->desktopName));