Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 1633:7812459eeed7
mod_bosh: Fix error reply for host-unknown errors
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 05 Aug 2009 03:08:21 +0100 |
parent | 1551:c6646e806d18 |
child | 1655:dc42bf326713 |
child | 1864:b9389286eece |
comparison
equal
deleted
inserted
replaced
1632:4a70cbb0fad7 | 1633:7812459eeed7 |
---|---|
134 | 134 |
135 -- TODO: Sanity checks here (rid, to, known host, etc.) | 135 -- TODO: Sanity checks here (rid, to, known host, etc.) |
136 if not hosts[attr.to] then | 136 if not hosts[attr.to] then |
137 -- Unknown host | 137 -- Unknown host |
138 log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to)); | 138 log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to)); |
139 session_close_reply.attr.condition = "host-unknown"; | 139 session_close_reply.body.attr.condition = "host-unknown"; |
140 request:send{ headers = default_headers, body = tostring(session_close_reply) }; | 140 request:send(session_close_reply); |
141 request.notopen = nil | 141 request.notopen = nil |
142 return; | 142 return; |
143 end | 143 end |
144 | 144 |
145 -- New session | 145 -- New session |