Software / code / prosody
Comparison
core/sessionmanager.lua @ 1450:c1c7b27b983b
Send xml:lang in stream headers, fixes #78
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 01 Jul 2009 17:53:18 +0100 |
| parent | 1395:1c547fb4e570 |
| child | 1469:9f2b6e2bc498 |
comparison
equal
deleted
inserted
replaced
| 1449:6a90316a81c3 | 1450:c1c7b27b983b |
|---|---|
| 163 session.version = tonumber(attr.version) or 0; | 163 session.version = tonumber(attr.version) or 0; |
| 164 session.streamid = m_random(1000000, 99999999); | 164 session.streamid = m_random(1000000, 99999999); |
| 165 (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); | 165 (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); |
| 166 | 166 |
| 167 send("<?xml version='1.0'?>"); | 167 send("<?xml version='1.0'?>"); |
| 168 send(format("<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s' version='1.0'>", session.streamid, session.host)); | 168 send(format("<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s' version='1.0' xml:lang='en'>", session.streamid, session.host)); |
| 169 | 169 |
| 170 if not hosts[session.host] then | 170 if not hosts[session.host] then |
| 171 -- We don't serve this host... | 171 -- We don't serve this host... |
| 172 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; | 172 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; |
| 173 return; | 173 return; |