Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/395#discussion_r21838010
  
    --- Diff: 
software/network/src/main/java/brooklyn/entity/network/bind/BindDnsServerImpl.java
 ---
    @@ -81,12 +80,11 @@
         private static final CharMatcher DOMAIN_NAME_MATCHER = 
DOMAIN_NAME_FIRST_CHAR_MATCHER
                 .or(CharMatcher.is('-'));
     
    -
         private class HostnameTransformer implements Function<Entity, String> {
             @Override
             public String apply(Entity input) {
                 String hostname = 
input.getAttribute(getConfig(HOSTNAME_SENSOR));
    -            hostname = 
DOMAIN_NAME_FIRST_CHAR_MATCHER.negate().trimFrom(hostname);
    +            hostname = 
DOMAIN_NAME_FIRST_CHAR_MATCHER.negate().trimLeadingFrom(hostname);
    --- End diff --
    
    Doesn't this mean that we'll accept names ending with hyphens? I don't 
think they're allowed. 
[Wikipedia](http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names)
 says:
    > The original specification of hostnames in RFC 952, mandated that labels 
could not start with a digit or with a hyphen, and must not end with a hyphen. 
However, a subsequent specification (RFC 1123) permitted hostname labels to 
start with digits. No other symbols, punctuation characters, or white space are 
permitted.
    
    RFC 952 says:
    > The last character must not be a minus sign or period.
    
    I don't think its restrictions on the last character were changed by RFC 
1123.
    
    Am I missing something?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to