mod_bosh: Fix error reply for host-unknown errors
authorMatthew Wild <mwild1@gmail.com>
Wed, 5 Aug 2009 02:08:21 +0000 (03:08 +0100)
committerMatthew Wild <mwild1@gmail.com>
Wed, 5 Aug 2009 02:08:21 +0000 (03:08 +0100)
plugins/mod_bosh.lua

index 744893c44a4a84688bd1020989231ddf8a6836f3..743ebdef437c67ad73cfd8b74bc080dfd59b87c0 100644 (file)
@@ -136,8 +136,8 @@ function stream_callbacks.streamopened(request, attr)
                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