Blame SOURCES/0001-Use-system-copy-of-effective_tld_names.dat.patch

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