Skip to content

Commit

Permalink
Add support for IDN zones
Browse files Browse the repository at this point in the history
  • Loading branch information
dhfelix committed Aug 23, 2019
1 parent bcd08f7 commit 9e11e7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>mx.nic.labs.reddog</groupId>
<artifactId>rdap-core</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
<packaging>jar</packaging>

<name>mx.nic.labs.reddog:rdap-core</name>
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/mx/nic/rdap/core/db/Domain.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,9 @@ public String getFQDN() {
return this.ldhName + dot;
}

String dot = this.zone.endsWith(".") ? Util.EMPTY_STRING : Util.DOT_STRING;
return this.ldhName + "." + this.zone + dot;
String tempZone = DomainLabel.nameToASCII(this.zone);
String dot = tempZone.endsWith(".") ? Util.EMPTY_STRING : Util.DOT_STRING;
return this.ldhName + "." + tempZone + dot;
}

public String getUnicodeFQDN() {
Expand All @@ -287,7 +288,8 @@ public String getUnicodeFQDN() {
return this.unicodeName + dot;
}

String dot = this.zone.endsWith(".") ? Util.EMPTY_STRING : Util.DOT_STRING;
return this.unicodeName + "." + this.zone + dot;
String tempZone = DomainLabel.nameToUnicode(this.zone);
String dot = tempZone.endsWith(".") ? Util.EMPTY_STRING : Util.DOT_STRING;
return this.unicodeName + "." + tempZone + dot;
}
}

0 comments on commit 9e11e7f

Please sign in to comment.