74b1e2
From d9f08c36a39b035ec70a37cb6aac5f980cc57054 Mon Sep 17 00:00:00 2001
74b1e2
From: Mikolaj Izdebski <mizdebsk@redhat.com>
74b1e2
Date: Tue, 20 Jan 2015 16:04:31 +0100
74b1e2
Subject: [PATCH 1/2] Use system copy of effective_tld_names.dat
74b1e2
74b1e2
---
74b1e2
 .../apache/http/conn/util/PublicSuffixMatcherLoader.java   | 7 +++----
74b1e2
 1 file changed, 3 insertions(+), 4 deletions(-)
74b1e2
74b1e2
diff --git a/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java b/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java
74b1e2
index 8783c5b..c858220 100644
74b1e2
--- a/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java
74b1e2
+++ b/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java
74b1e2
@@ -82,11 +82,10 @@ public final class PublicSuffixMatcherLoader {
74b1e2
         if (DEFAULT_INSTANCE == null) {
74b1e2
             synchronized (PublicSuffixMatcherLoader.class) {
74b1e2
                 if (DEFAULT_INSTANCE == null){
74b1e2
-                    final URL url = PublicSuffixMatcherLoader.class.getResource(
74b1e2
-                            "/mozilla/public-suffix-list.txt");
74b1e2
-                    if (url != null) {
74b1e2
+                    final File file = new File("/usr/share/publicsuffix/effective_tld_names.dat");
74b1e2
+                    if (file.exists()) {
74b1e2
                         try {
74b1e2
-                            DEFAULT_INSTANCE = load(url);
74b1e2
+                            DEFAULT_INSTANCE = load(file);
74b1e2
                         } catch (final IOException ex) {
74b1e2
                             // Should never happen
74b1e2
                             final Log log = LogFactory.getLog(PublicSuffixMatcherLoader.class);
74b1e2
-- 
74b1e2
2.19.1
74b1e2