Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 9777:2e07d2f71599 0.11
mod_bosh: Handle missing wait attribute (fixes #1288)
250855633092 did not fix this completely.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 10 Jan 2019 13:07:22 +0100 |
parent | 9380:7425af27fc67 |
child | 9794:4b5c24f13d4a |
child | 11123:0f4260f99ea2 |
comparison
equal
deleted
inserted
replaced
9776:c6cf32de940d | 9777:2e07d2f71599 |
---|---|
275 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", | 275 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |
276 ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); | 276 ["xmlns:stream"] = xmlns_streams, condition = "improper-addressing" }); |
277 response:send(tostring(close_reply)); | 277 response:send(tostring(close_reply)); |
278 return; | 278 return; |
279 end | 279 end |
280 if not rid or (not wait and attr.wait or wait < 0 or wait % 1 ~= 0) then | 280 if not rid or (not attr.wait or not wait or wait < 0 or wait % 1 ~= 0) then |
281 log("debug", "BOSH client sent invalid rid or wait attributes: rid=%s, wait=%s", tostring(attr.rid), tostring(attr.wait)); | 281 log("debug", "BOSH client sent invalid rid or wait attributes: rid=%s, wait=%s", tostring(attr.rid), tostring(attr.wait)); |
282 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", | 282 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |
283 ["xmlns:stream"] = xmlns_streams, condition = "bad-request" }); | 283 ["xmlns:stream"] = xmlns_streams, condition = "bad-request" }); |
284 response:send(tostring(close_reply)); | 284 response:send(tostring(close_reply)); |
285 return; | 285 return; |