aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/test/java/com
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-12-22 09:54:15 +0100
committerJon Marius Venstad <venstad@gmail.com>2020-12-22 09:54:15 +0100
commitea50af2f89c8bc5ba8b132b971c082a8cce4ad54 (patch)
tree0e44d3ab0ef1ab961d50c46452078525b04dde97 /jdisc_core/src/test/java/com
parent3c9108ed10ba6cb0b02eeceb52f3e3176f8b121a (diff)
Revert require port from URI when specified in binding
Diffstat (limited to 'jdisc_core/src/test/java/com')
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/application/UriPatternTestCase.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/application/UriPatternTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/application/UriPatternTestCase.java
index 0ea82508f06..c7d0b9ff6d2 100644
--- a/jdisc_core/src/test/java/com/yahoo/jdisc/application/UriPatternTestCase.java
+++ b/jdisc_core/src/test/java/com/yahoo/jdisc/application/UriPatternTestCase.java
@@ -263,6 +263,15 @@ public class UriPatternTestCase {
}
@Test
+ public void requireThatUrisWithImplicitPortFromSchemeMatchesBindingWithExplicitPort() {
+ UriPattern httpPattern = new UriPattern("http://host:80/path");
+ assertMatch(httpPattern, "http://host/path", NO_GROUPS);
+
+ UriPattern httpsPattern = new UriPattern("https://host:443/path");
+ assertMatch(httpsPattern, "https://host/path", NO_GROUPS);
+ }
+
+ @Test
public void requireThatHttpsSchemeIsHandledAsHttp() {
UriPattern httpPattern = new UriPattern("http://host:80/path");
assertMatch(httpPattern, "https://host:80/path", NO_GROUPS);