# HG changeset patch # User Kim Alvefur # Date 1514332834 -3600 # Node ID 7be8f649d97dc0b72cdcb6c30de383050879f3f5 # Parent 81fff93d3bc696feba9e40d07976db23e4d42d24 mod_bosh: Return implicit 404 instead of the proper BOSH terminate thing diff -r 81fff93d3bc6 -r 7be8f649d97d plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Wed Dec 13 15:34:53 2017 +0100 +++ b/plugins/mod_bosh.lua Wed Dec 27 01:00:34 2017 +0100 @@ -283,12 +283,9 @@ response:send(tostring(close_reply)); return; elseif to_host ~= module.host then - -- Unknown host - log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to)); - local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", - ["xmlns:stream"] = xmlns_streams, condition = "host-unknown" }); - response:send(tostring(close_reply)); - return; + -- Could be meant for a different instance of the module + -- if multiple instances are loaded with the same URL then this can happen + return; --> 404 end if not rid or (not wait and attr.wait or wait < 0 or wait % 1 ~= 0) then log("debug", "BOSH client sent invalid rid or wait attributes: rid=%s, wait=%s", tostring(attr.rid), tostring(attr.wait));