aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/test/java/com
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-02 15:53:31 +0200
commitad768dfbd6cea6d1d2588b295159f366f80b966f (patch)
treef93319309850d5d4fe2266b7234f4c5016abe1fc /jdisc_core/src/test/java/com
parent67f18277a9d68bb35bca00e25b38378495bcdd6a (diff)
Handle 'https' scheme in uri pattern matching as 'http'
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 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);