Commit a8596add authored by Christian Schudt's avatar Christian Schudt

OF-976 Language is not properly set in HttpSession

parent 21f57aa5
......@@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
import org.jivesoftware.openfire.SessionManager;
import org.jivesoftware.openfire.StreamID;
import org.jivesoftware.openfire.auth.UnauthorizedException;
......@@ -42,6 +43,8 @@ import org.jivesoftware.util.TaskEngine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.xml.XMLConstants;
/**
* Manages sessions for all users connecting to Openfire using the HTTP binding protocol,
* <a href="http://www.xmpp.org/extensions/xep-0124.html">XEP-0124</a>.
......@@ -168,7 +171,7 @@ public class HttpSessionManager {
// TODO Check if IP address is allowed to connect to the server
// Default language is English ("en").
String language = rootNode.attributeValue("xml:lang");
String language = rootNode.attributeValue(QName.get("lang", XMLConstants.XML_NS_URI));
if (language == null || "".equals(language)) {
language = "en";
}
......
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