You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2018/10/18 10:41:53 UTC

[Bug 62833] New: Support for using underscores in host

https://bz.apache.org/bugzilla/show_bug.cgi?id=62833

            Bug ID: 62833
           Summary: Support for using underscores in host
           Product: Tomcat 8
           Version: 8.5.x-trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Util
          Assignee: dev@tomcat.apache.org
          Reporter: i@sunisle.org
  Target Milestone: ----

In the previous version, such as 8.5.16, supported for using underscores in
host.

The recent version has made some refactorings for Httpparser and has not added
support for it.

The code is corrected as follows:

[org.apache.tomcat.util.http.parser.HttpParser]

````
public DomainParseState next(int c) {
    ...
    // Add '_' condition
    } else if (c == '-' || c == '_') {
        if (allowsHyphen) {
            return HYPHEN;
        } else {
            throw new
IllegalArgumentException(sm.getString("http.invalidCharacterDomain",
                    Character.toString((char) c), errorLocation));
        }
    } else {
        throw new IllegalArgumentException(sm.getString(
                "http.illegalCharacterDomain", Character.toString((char) c)));
    }
}
````

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62833] Support for using underscores in host

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62833

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
As RFC 7230 which ultimately refers to section 3.5 of RFC1034 and section 2.1
of RFC1123, the underscore character is not permitted in any part of a host
name or a fully qualified domain name.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 62833] Support for using underscores in host

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62833

--- Comment #2 from gudaoxuri <i...@sunisle.org> ---
Can you provide compatibility options? The one-size-fits-all approach is too
strong:-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org