Skip to content

Commit

Permalink
Merge pull request #47 from cip4/ssl2
Browse files Browse the repository at this point in the history
Ssl2
  • Loading branch information
rainer-prosi authored Aug 2, 2023
2 parents 802e93d + bc742aa commit 6c75028
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/main/java/org/cip4/jdfutility/server/JettyServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,7 @@ public String getBaseURL()
String ssl = getBaseURL(true);
if (http == null)
return ssl;
if (ssl == null)
return http;
return http + '\n' + ssl;
return http;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSession;

import org.cip4.jdflib.util.PlatformUtil;
import org.cip4.jdfutility.JDFUtilityTestBase;
import org.eclipse.jetty.http.BadMessageException;
import org.eclipse.jetty.server.Request;
Expand Down Expand Up @@ -81,8 +82,11 @@ public void testCustomize() throws UnknownHostException
rq.customize(e, request);
Mockito.when(request.getServerName()).thenReturn(InetAddress.getLocalHost().getHostName().toLowerCase());
rq.customize(e, request);
Mockito.when(request.getServerName()).thenReturn(InetAddress.getLocalHost().getHostName().toUpperCase());
rq.customize(e, request);
if (PlatformUtil.isWindows())
{
Mockito.when(request.getServerName()).thenReturn(InetAddress.getLocalHost().getHostName().toUpperCase());
rq.customize(e, request);
}
Mockito.when(request.getServerName()).thenReturn(InetAddress.getLocalHost().getHostAddress());
rq.customize(e, request);
Mockito.when(request.getServerName()).thenReturn(InetAddress.getLocalHost().getCanonicalHostName());
Expand Down

0 comments on commit 6c75028

Please sign in to comment.