diff --git a/demo.html b/demo.html
new file mode 100644
index 0000000..f86b3e3
--- /dev/null
+++ b/demo.html
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/dns.type.cname.js b/dns.type.cname.js
index f1d9770..fff9249 100644
--- a/dns.type.cname.js
+++ b/dns.type.cname.js
@@ -11,4 +11,3 @@ exports.DNS_TYPE_CNAME = function (ab, packet, record) {
};
}('undefined' !== typeof window ? window : exports));
-
diff --git a/dns.type.mx.js b/dns.type.mx.js
index 2761cb2..f9929bc 100644
--- a/dns.type.mx.js
+++ b/dns.type.mx.js
@@ -30,7 +30,7 @@ exports.DNS_TYPE_MX = function (ab, packet, record) {
for (var i = 0; i < dv.byteLength; i += 1) {
- console.log(dv.getUint8(i, false.toString(16)));
+ // console.log(dv.getUint8(i, false.toString(16)));
//Priority is the first two bytes
if (i < 2){
@@ -53,7 +53,7 @@ exports.DNS_TYPE_MX = function (ab, packet, record) {
console.log("data at index " + i + ":" + temp);
// I need to place the '.' in the correct place. This is wrong though.
- if ((temp.trim() === '' && i > 2) || (!temp.match(/^[a-zA-Z0-9._-]+$/) && i > 2)) {
+ if ((temp.trim() === '' && i > 2) /*|| (!temp.match(/^[a-zA-Z0-9._-]+$/) && i > 2)*/) {
s.exchange += ".";
}
@@ -75,7 +75,7 @@ exports.DNS_TYPE_MX = function (ab, packet, record) {
// the below code returns an empty string.
- // s.exchange = unpackLabels(new Uint8Array(ab), record.rdstart, { byteLength: 0, cpcount: 0, labels: [], name: '' }).labels;
+ s.exchange = unpackLabels(new Uint8Array(ab), record.rdstart+2, { byteLength: 0, cpcount: 0, labels: [], name: '' }).labels;
return s;