summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-01-17 13:47:09 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-01-17 13:47:09 +0100
commit2254587e62f050edd11af9e182b65aff3184eba6 (patch)
tree690d07c72ce4fd83755f0189c0db57017d67bac6 /src
parentba391ba4bbc3a51b896af917a9b8c8c7a29b9391 (diff)
Split protocol and handler code apart.
Diffstat (limited to 'src')
-rw-r--r--src/http.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/http.cc b/src/http.cc
index 8aa83c3..6b14ed5 100644
--- a/src/http.cc
+++ b/src/http.cc
@@ -62,6 +62,14 @@ int callback_http(struct libwebsocket_context * context,
break;
}
+ if(in && strcmp((const char *)in, "/handler.js") == 0) {
+ if(libwebsockets_serve_http_file(wsi,
+ LOCAL_RESOURCE_PATH"/handler.js",
+ "text/javascript"))
+ DEBUG(httpd,"Failed to send javascript\n");
+ break;
+ }
+
/* send the script... when it runs it'll start websockets */
if(libwebsockets_serve_http_file(wsi,