fix #1181 replace with http.proxy.port

This commit is contained in:
Shinsuke Sugaya 2017-07-23 18:32:51 +09:00
parent 6d5f5fe77a
commit 6c962aabad

View file

@ -1709,7 +1709,7 @@ public interface FessProp {
String getHttpProxyHost();
Integer getHttpProxyHostAsInteger();
Integer getHttpProxyPortAsInteger();
String getHttpProxyUsername();
@ -1718,8 +1718,8 @@ public interface FessProp {
public default Proxy getHttpProxy() {
Proxy proxy = (Proxy) propMap.get(HTML_PROXY);
if (proxy == null) {
if (StringUtil.isNotBlank(getHttpProxyHost()) && getHttpProxyHostAsInteger() != null) {
final SocketAddress addr = new InetSocketAddress(getHttpProxyHost(), getHttpProxyHostAsInteger());
if (StringUtil.isNotBlank(getHttpProxyHost()) && getHttpProxyPortAsInteger() != null) {
final SocketAddress addr = new InetSocketAddress(getHttpProxyHost(), getHttpProxyPortAsInteger());
proxy = new Proxy(Type.HTTP, addr);
if (StringUtil.isNotBlank(getHttpProxyUsername())) {
Authenticator.setDefault(new Authenticator() {