diff options
author | Christian Beier <[email protected]> | 2011-10-04 18:26:48 +0200 |
---|---|---|
committer | Christian Beier <[email protected]> | 2011-10-04 18:26:48 +0200 |
commit | edbd5ab8d4512a7adb089f3e4791e54523748253 (patch) | |
tree | b6dc74ec651e5a5173fe8d26d67392b35888c65d /libvncserver/httpd.c | |
parent | bffd9ee33bd141f5c75304b1430d2ea2725239b3 (diff) | |
download | libtdevnc-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.c | 10 |
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)); |