# HG changeset patch # User Kim Alvefur # Date 1570900603 -7200 # Node ID f2bbad04cf6471eb1535cd7d64af114c14876806 # Parent 3f4c254255896ebeb5117a8235069d3d651684bf mod_websocket: Guard against upgrading to websocket from a HEAD request diff -r 3f4c25425589 -r f2bbad04cf64 plugins/mod_websocket.lua --- a/plugins/mod_websocket.lua Sat Oct 12 18:27:54 2019 +0200 +++ b/plugins/mod_websocket.lua Sat Oct 12 19:16:43 2019 +0200 @@ -136,7 +136,7 @@ conn.starttls = false; -- Prevent mod_tls from believing starttls can be done - if not request.headers.sec_websocket_key then + if not request.headers.sec_websocket_key or request.method ~= "GET" then response.headers.content_type = "text/html"; return [[Websocket

It works! Now point your WebSocket client to this URL to connect to Prosody.