Skip to content

Commit

Permalink
set implicit https port to 443.
Browse files Browse the repository at this point in the history
  • Loading branch information
powerLambda committed Jul 20, 2017
1 parent ec74ad5 commit b520fd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ static Pair<String, Integer> getHostPort(String id) {

if (id.toLowerCase().startsWith("http://")) {
id = id.substring(7);
port = 80;
} else if (id.toLowerCase().startsWith("https://")) {
id = id.substring(8);
port = 443;
}

if (id.contains("/")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void createSecureSchemeHost() {
Server server = new Server("https://netflix.com");
assertEquals("https", server.getScheme());
assertEquals("netflix.com", server.getHost());
assertEquals(80, server.getPort());
assertEquals(443, server.getPort());
}

@Test
Expand Down

0 comments on commit b520fd7

Please sign in to comment.