View | Details | Raw Unified | Return to bug 62371
Collapse All | Expand All

(-)java/org/apache/tomcat/util/http/parser/HttpParser.java (-1 / +1 lines)
Lines 876-882 Link Here
876
876
877
        public DomainParseState next(int c, int segmentIndex) {
877
        public DomainParseState next(int c, int segmentIndex) {
878
            if (HttpParser.isAlpha(c)) {
878
            if (HttpParser.isAlpha(c)) {
879
                if (ALL_ALPHA == this || NEW == this || PERIOD == this) {
879
                if (ALL_ALPHA == this || NEW == this || PERIOD == this || HYPHEN == this) {
880
                    return ALL_ALPHA;
880
                    return ALL_ALPHA;
881
                } else {
881
                } else {
882
                    return ALPHA;
882
                    return ALPHA;
(-)test/org/apache/tomcat/util/http/parser/TestHttpParserHost.java (+1 lines)
Lines 90-95 Link Here
90
        result.add(new Object[] { TestType.IPv4, "0com:8080", Integer.valueOf(4), null} );
90
        result.add(new Object[] { TestType.IPv4, "0com:8080", Integer.valueOf(4), null} );
91
        result.add(new Object[] { TestType.IPv4, "123", Integer.valueOf(-1), null} );
91
        result.add(new Object[] { TestType.IPv4, "123", Integer.valueOf(-1), null} );
92
        result.add(new Object[] { TestType.IPv4, "123:8080", Integer.valueOf(3), null} );
92
        result.add(new Object[] { TestType.IPv4, "123:8080", Integer.valueOf(3), null} );
93
        result.add(new Object[] { TestType.IPv4, "tasks.docker-service:8098", Integer.valueOf(20), null} );
93
        // Domain Name - invalid
94
        // Domain Name - invalid
94
        result.add(new Object[] { TestType.IPv4, ".", Integer.valueOf(-1), IAE} );
95
        result.add(new Object[] { TestType.IPv4, ".", Integer.valueOf(-1), IAE} );
95
        result.add(new Object[] { TestType.IPv4, ".:8080", Integer.valueOf(-1), IAE} );
96
        result.add(new Object[] { TestType.IPv4, ".:8080", Integer.valueOf(-1), IAE} );

Return to bug 62371