Index: java/org/apache/tomcat/util/http/parser/HttpParser.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- java/org/apache/tomcat/util/http/parser/HttpParser.java (date 1524857434000) +++ java/org/apache/tomcat/util/http/parser/HttpParser.java (date 1526057712000) @@ -876,7 +876,7 @@ public DomainParseState next(int c, int segmentIndex) { if (HttpParser.isAlpha(c)) { - if (ALL_ALPHA == this || NEW == this || PERIOD == this) { + if (ALL_ALPHA == this || NEW == this || PERIOD == this || HYPHEN == this) { return ALL_ALPHA; } else { return ALPHA; Index: test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java (date 1524857434000) +++ test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java (date 1526057783000) @@ -90,6 +90,7 @@ result.add(new Object[] { TestType.IPv4, "0com:8080", Integer.valueOf(4), null} ); result.add(new Object[] { TestType.IPv4, "123", Integer.valueOf(-1), null} ); result.add(new Object[] { TestType.IPv4, "123:8080", Integer.valueOf(3), null} ); + result.add(new Object[] { TestType.IPv4, "tasks.docker-service:8098", Integer.valueOf(20), null} ); // Domain Name - invalid result.add(new Object[] { TestType.IPv4, ".", Integer.valueOf(-1), IAE} ); result.add(new Object[] { TestType.IPv4, ".:8080", Integer.valueOf(-1), IAE} );