# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1249438101 -3600
# Node ID 7812459eeed7aa9bdfc40f3cba301d712d8ee436
# Parent  4a70cbb0fad78c2b3f53d91a55e44cf59a91bb7e
mod_bosh: Fix error reply for host-unknown errors

diff -r 4a70cbb0fad7 -r 7812459eeed7 plugins/mod_bosh.lua
--- a/plugins/mod_bosh.lua	Wed Aug 05 03:07:45 2009 +0100
+++ b/plugins/mod_bosh.lua	Wed Aug 05 03:08:21 2009 +0100
@@ -136,8 +136,8 @@
 		if not hosts[attr.to] then
 			-- Unknown host
 			log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to));
-			session_close_reply.attr.condition = "host-unknown";
-			request:send{ headers = default_headers, body = tostring(session_close_reply) };
+			session_close_reply.body.attr.condition = "host-unknown";
+			request:send(session_close_reply);
 			request.notopen = nil
 			return;
 		end