# HG changeset patch # User Kim Alvefur # Date 1461061155 -7200 # Node ID d24d88feed763dab349bd3760d1953f0625ecfe3 # Parent 250855633092b0103ec79c985e5c547c6d33ef06 mod_bosh: Return a proper BOSH error response from XML parse error callback (see #343) diff -r 250855633092 -r d24d88feed76 plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Tue Apr 19 12:18:19 2016 +0200 +++ b/plugins/mod_bosh.lua Tue Apr 19 12:19:15 2016 +0200 @@ -412,8 +412,9 @@ log("debug", "Error parsing BOSH request payload; %s", error); if not context.sid then local response = context.response; - response.status_code = 400; - response:send(); + local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", + ["xmlns:stream"] = xmlns_streams, condition = "bad-request" }); + response:send(tostring(close_reply)); return; end