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