Mercurial > prosody-hg
comparison plugins/mod_websocket.lua @ 7294:5f4d0753c818
mod_websocket: Make sure stanza xmlns filter runs late in the chain
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 18 Mar 2016 00:08:33 +0100 |
| parents | f7203c7cb7ff |
| children | e327e5b592f5 |
comparison
equal
deleted
inserted
replaced
| 7293:c4af754d1e1b | 7294:5f4d0753c818 |
|---|---|
| 273 attr.xmlns = attr.xmlns or xmlns_client; | 273 attr.xmlns = attr.xmlns or xmlns_client; |
| 274 if stanza.name:find("^stream:") then | 274 if stanza.name:find("^stream:") then |
| 275 attr["xmlns:stream"] = attr["xmlns:stream"] or xmlns_streams; | 275 attr["xmlns:stream"] = attr["xmlns:stream"] or xmlns_streams; |
| 276 end | 276 end |
| 277 return stanza; | 277 return stanza; |
| 278 end); | 278 end, -1000); |
| 279 | 279 |
| 280 add_filter(session, "bytes/out", function(data) | 280 add_filter(session, "bytes/out", function(data) |
| 281 return build_frame({ FIN = true, opcode = 0x01, data = tostring(data)}); | 281 return build_frame({ FIN = true, opcode = 0x01, data = tostring(data)}); |
| 282 end); | 282 end); |
| 283 | 283 |
