private static CookieOrigin adjustEffectiveHost(final CookieOrigin origin){
  String host=origin.getHost();
  boolean isLocalHost=true;
  for (int i=0; i < host.length(); i++) {
    char ch=host.charAt(i);
    if (ch == '.' || ch == ':') {
      isLocalHost=false;
      break;
    }
  }
  if (isLocalHost) {
    host+=".local";
    return new CookieOrigin(host,origin.getPort(),origin.getPath(),origin.isSecure());
  }
 else {
    return origin;
  }
}

private static CookieOrigin adjustEffectiveHost ( final CookieOrigin origin ) { String host = origin . getHost ( ) ; boolean isLocalHost = true ; for ( int i = 0 ; i < host . length ( ) ; i ++ ) { char ch = host . charAt ( i ) ; if ( ch == '.' || ch == ':' ) { isLocalHost = false ; break ; } } if ( isLocalHost ) { host += ".local" ; return new CookieOrigin ( host , origin . getPort ( ) , origin . getPath ( ) , origin . isSecure ( ) ) ; } else { return origin ; } }
set ' effective host name ' as defined in rfc 2965 . < p > if a host name contains no dots , the effective host name is that name with the string . local appended to it . otherwise the effective host name is the same as the host name . note that all effective host names contain at least one dot .
