Commit c58efa58 authored by Guus der Kinderen's avatar Guus der Kinderen

Merge pull request #477 from sco0ter/languageTag

xml:lang in stream header should conform to a language tag.
parents 6238ec6a c07d3f93
......@@ -278,7 +278,7 @@ abstract class SocketReadingMode {
sb.append("\" id=\"");
sb.append(socketReader.session.getStreamID().toString());
sb.append("\" xml:lang=\"");
sb.append(socketReader.session.getLanguage());
sb.append(socketReader.session.getLanguage().toLanguageTag());
sb.append("\" version=\"");
sb.append(Session.MAJOR_VERSION).append('.').append(Session.MINOR_VERSION);
sb.append("\">");
......
......@@ -580,7 +580,7 @@ public abstract class StanzaHandler {
sb.append("\" id=\"");
sb.append(session.getStreamID());
sb.append("\" xml:lang=\"");
sb.append(session.getLanguage());
sb.append(session.getLanguage().toLanguageTag());
sb.append("\" version=\"");
sb.append(Session.MAJOR_VERSION).append('.').append(Session.MINOR_VERSION);
sb.append("\">");
......
......@@ -347,7 +347,7 @@ public class LocalClientSession extends LocalSession implements ClientSession {
sb.append("\" id=\"");
sb.append(session.getStreamID().toString());
sb.append("\" xml:lang=\"");
sb.append(language);
sb.append(language.toLanguageTag());
// Don't include version info if the version is 0.0.
if (majorVersion != 0) {
sb.append("\" version=\"");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment