Mercurial > prosody-hg
comparison plugins/mod_bosh.lua @ 13962:c5a2846c9cba
mod_bosh: Pass stanzas trough bytes/out filter
For consistency with mod_c2s. Not sure if this makes sense given that
BOSH is different from other methods. E.g. with compression, this would
compress only the stanzas and not the opening and closing body tags
without more work.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 01 Jul 2025 14:07:55 +0200 |
| parents | ab7be38146bc |
| children | 44f859531df7 |
comparison
equal
deleted
inserted
replaced
| 13961:ab7be38146bc | 13962:c5a2846c9cba |
|---|---|
| 359 -- We need to ensure that outgoing stanzas have the jabber:client xmlns | 359 -- We need to ensure that outgoing stanzas have the jabber:client xmlns |
| 360 if s.attr and not s.attr.xmlns then | 360 if s.attr and not s.attr.xmlns then |
| 361 s = st.clone(s); | 361 s = st.clone(s); |
| 362 s.attr.xmlns = "jabber:client"; | 362 s.attr.xmlns = "jabber:client"; |
| 363 end | 363 end |
| 364 s = session.filter("bytes/out", tostring(s)); | |
| 364 --log("debug", "Sending BOSH data: %s", s); | 365 --log("debug", "Sending BOSH data: %s", s); |
| 365 if not s then return true end | 366 if not s then return true end |
| 366 t_insert(session.send_buffer, tostring(s)); | 367 t_insert(session.send_buffer, tostring(s)); |
| 367 | 368 |
| 368 local oldest_request = r[1]; | 369 local oldest_request = r[1]; |
