projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c472ea
)
mod_bosh: Return a proper BOSH error response from XML parse error callback (see...
author
Kim Alvefur
<zash@zash.se>
Tue, 19 Apr 2016 10:19:15 +0000
(12:19 +0200)
committer
Kim Alvefur
<zash@zash.se>
Tue, 19 Apr 2016 10:19:15 +0000
(12:19 +0200)
plugins/mod_bosh.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_bosh.lua
b/plugins/mod_bosh.lua
index 6ec3ff1680f144a9ec28a4a308822937bc8977d1..1f928eed5d05ea9a7777407bf6ee604685c4f4a0 100644
(file)
--- a/
plugins/mod_bosh.lua
+++ b/
plugins/mod_bosh.lua
@@
-412,8
+412,9
@@
function stream_callbacks.error(context, error)
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