291 return; |
291 return; |
292 end |
292 end |
293 |
293 |
294 if not prosody.hosts[to_host] then |
294 if not prosody.hosts[to_host] then |
295 log("debug", "BOSH client tried to connect to non-existant host: %s", attr.to); |
295 log("debug", "BOSH client tried to connect to non-existant host: %s", attr.to); |
|
296 report_bad_host(); |
296 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |
297 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |
297 ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); |
298 ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); |
298 response:send(tostring(close_reply)); |
299 response:send(tostring(close_reply)); |
299 return; |
300 return; |
300 end |
301 end |
301 |
302 |
302 if prosody.hosts[to_host].type ~= "local" then |
303 if prosody.hosts[to_host].type ~= "local" then |
303 log("debug", "BOSH client tried to connect to %s host: %s", prosody.hosts[to_host].type, attr.to); |
304 log("debug", "BOSH client tried to connect to %s host: %s", prosody.hosts[to_host].type, attr.to); |
|
305 report_bad_host(); |
304 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |
306 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |
305 ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); |
307 ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); |
306 response:send(tostring(close_reply)); |
308 response:send(tostring(close_reply)); |
307 return; |
309 return; |
308 end |
310 end |