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