123 request.notopen = nil; -- Signals that we accept this opening tag |
123 request.notopen = nil; -- Signals that we accept this opening tag |
124 |
124 |
125 -- TODO: Sanity checks here (rid, to, known host, etc.) |
125 -- TODO: Sanity checks here (rid, to, known host, etc.) |
126 if not hosts[attr.to] then |
126 if not hosts[attr.to] then |
127 -- Unknown host |
127 -- Unknown host |
|
128 log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to)); |
128 session_close_reply.attr.condition = "host-unknown"; |
129 session_close_reply.attr.condition = "host-unknown"; |
129 request:send{ headers = default_headers, body = tostring(session_close_reply) }; |
130 request:send{ headers = default_headers, body = tostring(session_close_reply) }; |
130 request.notopen = nil |
131 request.notopen = nil |
131 return; |
132 return; |
132 end |
133 end |