aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-27 01:00:34 +0100
committerKim Alvefur <zash@zash.se>2017-12-27 01:00:34 +0100
commit90b5a7c1e20c3ba1aa819b5979a2bca470ca22af (patch)
tree70a2fc6ae5c1524096c0714f7aabb2c0493b2ec3 /plugins
parent9a3dde476515ce879bc79b4017c25f5dbe164759 (diff)
downloadprosody-90b5a7c1e20c3ba1aa819b5979a2bca470ca22af.tar.gz
prosody-90b5a7c1e20c3ba1aa819b5979a2bca470ca22af.zip
mod_bosh: Return implicit 404 instead of the proper BOSH terminate thing
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 2cb63bdf..5e7701a3 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -283,12 +283,9 @@ function stream_callbacks.streamopened(context, attr)
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));