3
0

By default, websockets paths start with ws/.

This commit is contained in:
Karchnu 2020-08-21 03:00:04 +02:00
parent b7300ef529
commit 492a4dae34

View File

@ -99,7 +99,7 @@ def ws_http_upgrade(client)
headers = headers.map { |key, value| "#{key}: #{value[0]}\r\n" }.join
# requested service, fd
req_service = request.path.lchop
req_service = request.path.lchop.sub "ws/", ""
if req_service.ends_with? ".JSON"
Context.context.is_json[client.fd] = true