]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/util/DNSUtil.java
FIX: add UTF-8 as charset where appropriate.
[gigi.git] / src / org / cacert / gigi / util / DNSUtil.java
index e8a3a40d2edc179f3be6245badb51e9ad980f819..7ebbf83d48e9a8b97f9657fc64ae68044110b838 100644 (file)
@@ -15,8 +15,6 @@ public class DNSUtil {
     static {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory");
-        // env.put(Context.AUTHORITATIVE, "true");
-        // env.put(Context.PROVIDER_URL, "dns://ns.dyn.dogcraft.de");
         try {
             context = new InitialDirContext(env);
         } catch (NamingException e) {
@@ -42,6 +40,7 @@ public class DNSUtil {
         Attributes dnsLookup = context.getAttributes(name, new String[] {
             "TXT"
         });
+        context.close();
 
         return extractTextEntries(dnsLookup.get("TXT"));
     }