cryptotoad / prosody-modules

Automatically exported from code.google.com/p/prosody-modules
MIT License
0 stars 2 forks source link

[mod_websocket] Missing xmlns on stream:features #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I connect to prosody (c2s) with a socket stream features includes an xmlns 
as follows:
DIGEST-MD5SCRAM-SHA-1SCRAM-SHA-1-PLUS /stream:features ``` However when using the websocket implementation the xmlns isn't present: ``` stream:featuresDIGEST-MD5PLAINSCRAM-SHA-1SCRAM-SHA-1-P LUS/stream:features ``` Is this expected behaviour or should the 'stream:xmlns' be present? Also a typo on line 180 - c*l*osed :) ------------------- Prosody modules (latest update) changeset: 1256:ab80da799edf tag: tip user: Florian Zeitz date: Sat Dec 21 19:28:34 2013 +0100 summary: mod_admin_web: Bump strophejs version ------------------- Prosody information Prosody trunk nightly build 452 (2013-12-18, b3d5aa57c454) # Prosody directories Data directory: /var/lib/prosody Plugin directory: /usr/lib/prosody/modules/ Config directory: /etc/prosody Source directory: /usr/lib/prosody # Lua environment Lua version: Lua 5.1 Lua module search paths: /usr/lib/prosody/?.lua /usr/local/share/lua/5.1/?.lua /usr/local/share/lua/5.1/?/init.lua /usr/local/lib/lua/5.1/?.lua /usr/local/lib/lua/5.1/?/init.lua /usr/share/lua/5.1/?.lua /usr/share/lua/5.1/?/init.lua Lua C module search paths: /usr/lib/prosody/?.so /usr/local/lib/lua/5.1/?.so /usr/lib/x86_64-linux-gnu/lua/5.1/?.so /usr/lib/lua/5.1/?.so /usr/local/lib/lua/5.1/loadall.so LuaRocks: Not installed # Lua module versions lfs: LuaFileSystem 1.5.0 lxp: LuaExpat 1.2.0 pposix: 0.3.6 socket: LuaSocket 3.0-rc1 ssl: 0.4.1 ``` Original issue reported on code.google.com by `lloydwat...@googlemail.com` on 30 Dec 2013 at 7:38
GoogleCodeExporter commented 9 years ago
I can confirm this. It's not a websockets-only problem though, with BOSH it 
happens as well (missing xmlns on stream:features). 

I checked afterwards what ejabberd does (with BOSH only) - it *does* send the 
xmlns on stream:features.

I guess this is a bug in prosody then. 

Original comment by michael....@gmail.com on 10 Jan 2014 at 8:23

GoogleCodeExporter commented 9 years ago
I have never seen prosody send a stream xmlns on <stream:features/> on a normal 
c2s stream (it is not needed since the <stream:stream> includes it). Can't 
reproduce that either, on any deployment, or current checkout.

For mod_bosh this is entirely expected behaviour, too. The stream namespace is 
included on the surrounding <body/> element, cf. XEP-0206 Example 2.

For mod_websocket this is in fact an open issue in the XMPP WG. The discussion 
is, whether to include all required namespaces in each WebSocket message, or 
whether to send data as it would be on a regular c2s stream.
We currently opt for the later, which is also suggested by the current version 
of the XMPP over WebSocket draft 
<http://tools.ietf.org/html/draft-ietf-xmpp-websocket-00>.

Did fix the typo though.

Original comment by flo...@babelmonkeys.de on 10 Jan 2014 at 11:35