diff options
author | Luciano Iam <lucianito@gmail.com> | 2020-04-21 14:13:15 +0200 |
---|---|---|
committer | Luciano Iam <lucianito@gmail.com> | 2020-04-21 15:53:27 +0200 |
commit | cc08a2d945568fc83cdf03d228bd20c3e6cccc02 (patch) | |
tree | 0cd5fc9eaa7bfcc1ad8b86c8300691f3b630a612 /libs/surfaces/websockets/server.cc | |
parent | 47e4216012b9c31666a857d0d9259811a899c244 (diff) |
WebSockets: compatibility fixes for Windows
Escape path strings in surfaces.json
Default to index.html in mount points
Diffstat (limited to 'libs/surfaces/websockets/server.cc')
-rw-r--r-- | libs/surfaces/websockets/server.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index 2a69b5eff8..5dba36c5fa 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -69,21 +69,18 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface) memset (&_lws_mnt_root, 0, sizeof (lws_http_mount)); _lws_mnt_root.mountpoint = "/"; _lws_mnt_root.mountpoint_len = strlen (_lws_mnt_root.mountpoint); - _lws_mnt_root.origin_protocol = LWSMPRO_FILE; _lws_mnt_root.origin = _resources.index_dir ().c_str (); + _lws_mnt_root.origin_protocol = LWSMPRO_FILE; + _lws_mnt_root.def = "index.html"; _lws_mnt_root.cache_max_age = 3600; _lws_mnt_root.cache_reusable = 1; _lws_mnt_root.cache_revalidate = 1; /* user defined surfaces in the user config directory */ - memset (&_lws_mnt_user, 0, sizeof (lws_http_mount)); + memcpy (&_lws_mnt_user, &_lws_mnt_root, sizeof (lws_http_mount)); _lws_mnt_user.mountpoint = "/user"; _lws_mnt_user.mountpoint_len = strlen (_lws_mnt_user.mountpoint); - _lws_mnt_user.origin_protocol = LWSMPRO_FILE; _lws_mnt_user.origin = _resources.user_dir ().c_str (); - _lws_mnt_user.cache_max_age = 3600; - _lws_mnt_user.cache_reusable = 1; - _lws_mnt_user.cache_revalidate = 1; _lws_mnt_root.mount_next = &_lws_mnt_user; |