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