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