httpserver_httpserver.patch 565 B

1234567891011121314151617
  1. diff --git a/httpserver.lua b/httpserver.lua
  2. index a244335..00d5934 100644
  3. --- a/httpserver.lua
  4. +++ b/httpserver.lua
  5. @@ -96,6 +96,12 @@ return function (port)
  6. local function onReceive(connection, payload)
  7. collectgarbage()
  8. +
  9. + -- Check websocket ASAP
  10. + if payload:find("Upgrade: websocket") then
  11. + return dofile('webide-websocket.lc')(connection, payload)
  12. + end
  13. +
  14. local conf = dofile("httpserver-conf.lc")
  15. local auth
  16. local user = "Anonymous"