Commit 50eefe72 authored by Guus der Kinderen's avatar Guus der Kinderen

Merge leftovers.

parent fc26b5d7
......@@ -337,12 +337,19 @@ public class AdminConsolePlugin implements Plugin {
if (Boolean.getBoolean("developmentMode")) {
System.out.println(LocaleUtils.getLocalizedString("admin.console.devmode"));
context = new WebAppContext(contexts, pluginDir.getParentFile().getParentFile().getParentFile().getParent() +
File.separator + "src" + File.separator + "web", "/");
File.separator + "src" + File.separator + "web", "/");
}
else {
context = new WebAppContext(contexts, pluginDir.getAbsoluteFile() + File.separator + "webapp",
"/");
}
// Ensure the JSP engine is initialized correctly (in order to be able to cope with Tomcat/Jasper precompiled JSPs).
final List<ContainerInitializer> initializers = new ArrayList<>();
initializers.add(new ContainerInitializer(new JettyJasperInitializer(), null));
context.setAttribute("org.eclipse.jetty.containerInitializers", initializers);
context.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());
context.setWelcomeFiles(new String[]{"index.jsp"});
}
......
......@@ -23,10 +23,7 @@ package org.jivesoftware.openfire.http;
import java.io.File;
import java.security.KeyStore;
import java.security.cert.X509Certificate;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import javax.servlet.DispatcherType;
import javax.servlet.Filter;
......
......@@ -194,7 +194,7 @@ public class SocketConnection implements Connection {
// Start handshake
tlsStreamHandler.start();
// Use new wrapped writers
writer = new BufferedWriter(new OutputStreamWriter(tlsStreamHandler.getOutputStream(), CHARSET));
writer = new BufferedWriter(new OutputStreamWriter(tlsStreamHandler.getOutputStream(), StandardCharsets.UTF_8));
xmlSerializer = new XMLSocketWriter(writer, this);
}
}
......
......@@ -31,7 +31,9 @@ import java.net.UnknownHostException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CodingErrorAction;
import java.nio.charset.StandardCharsets;
import java.security.cert.Certificate;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantLock;
import javax.net.ssl.*;
......@@ -68,8 +70,6 @@ public class NIOConnection implements Connection {
private static final Logger Log = LoggerFactory.getLogger(NIOConnection.class);
private ConnectionConfiguration configuration;
public enum State { RUNNING, CLOSING, CLOSED }
/**
* The utf-8 charset for decoding and encoding XMPP packet streams.
*/
......@@ -108,7 +108,7 @@ public class NIOConnection implements Connection {
* keep this flag to avoid using the connection between #close was used and the socket is actually
* closed.
*/
private AtomicReference<State> state = new AtomicReference<State>(State.OPEN);
private AtomicReference<State> state = new AtomicReference<>(State.OPEN);
/**
* Lock used to ensure the integrity of the underlying IoSession (refer to
......@@ -125,7 +125,6 @@ public class NIOConnection implements Connection {
this.ioSession = session;
this.backupDeliverer = packetDeliverer;
this.configuration = configuration;
state = State.RUNNING;
}
@Override
......
......@@ -483,6 +483,9 @@
case WEBADMIN:
typeName = LocaleUtils.getLocalizedString("ports.admin_console");
break;
case BOSH_C2S:
typeName = LocaleUtils.getLocalizedString("ports.http_bind");
break;
default:
typeName = "(unspecified)";
break;
......@@ -517,6 +520,13 @@
description = LocaleUtils.getLocalizedString( "ports.admin_console.desc_unsecured" );
}
break;
case BOSH_C2S:
if ( connectionListener.getTLSPolicy().equals( Connection.TLSPolicy.legacyMode ) ) {
description = LocaleUtils.getLocalizedString( "ports.http_bind.desc_secured" );
} else {
description = LocaleUtils.getLocalizedString( "ports.http_bind.desc_unsecured" );
}
break;
default:
description = "";
break;
......@@ -546,32 +556,6 @@
<td><fmt:message key="ports.file_proxy.desc" /></td>
</tr>
<% } %>
<%
if (httpBindManager.isHttpBindEnabled()) {
%>
<%
if (httpBindManager.getHttpBindUnsecurePort() > 0) {
%>
<tr>
<td><%= interfaceName %></td>
<td><%= httpBindManager.getHttpBindUnsecurePort() %></td>
<td><img src="images/blank.gif" width="1" height="1" alt=""></td>
<td><fmt:message key="ports.http_bind" /></td>
<td><fmt:message key="ports.http_bind.desc_unsecured" /></td>
</tr>
<% } %>
<%
if (httpBindManager.isHttpsBindActive()) {
%>
<tr>
<td><%= interfaceName %></td>
<td><%= httpBindManager.getHttpBindSecurePort() %></td>
<td><img src="images/lock.gif" width="16" height="16" border="0" alt="<fmt:message key="ports.secure.alt" />" title="<fmt:message key="ports.secure.alt" />"/></td>
<td><fmt:message key="ports.http_bind" /></td>
<td><fmt:message key="ports.http_bind.desc_secured" /></td>
</tr>
<% } %>
<% } %>
<%
if (mediaProxyService.isEnabled()) {
%>
......
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