aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2019-04-02 15:53:31 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2019-04-03 17:24:40 +0200
commit555d9c5ed27e57a0e58cc1b8c79b0df97d4fa9be (patch)
tree70fe5ed88c1aeb837c86001be5df651114c6c7c9 /jdisc_core/src/test/java/com/yahoo
parentbc8bfdcbf85b0be52997442345e5e3c4269cad18 (diff)
Handle 'https' scheme in uri pattern matching as 'http'
Diffstat (limited to 'jdisc_core/src/test/java/com/yahoo')
-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 c91a7134c3a..d2499bbf369 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
@@ -295,6 +295,15 @@ public class UriPatternTestCase {
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);
+
+ UriPattern httpsPattern = new UriPattern("https://host:443/path");
+ assertMatch(httpsPattern, "http://host:443/path", NO_GROUPS);
+ }
+
private static void assertIllegalPattern(String uri) {
try {
new UriPattern(uri);