You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by sn...@apache.org on 2018/06/13 08:28:31 UTC

[nutch] 01/01: Merge pull request #338 from sebastian-nagel/NUTCH-2578

This is an automated email from the ASF dual-hosted git repository.

snagel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git

commit 8e4dd318f5b32ff4fc5f3fb150df15552f477861
Merge: 49c9349 2c69694
Author: Sebastian Nagel <sn...@apache.org>
AuthorDate: Wed Jun 13 10:28:25 2018 +0200

    Merge pull request #338 from sebastian-nagel/NUTCH-2578
    
    NUTCH-2578 Avoid lock by MimeUtil in constructor of protocol.Content

 src/java/org/apache/nutch/protocol/Content.java    | 23 ++++++++++++++++++++++
 src/java/org/apache/nutch/util/MimeUtil.java       |  6 +++++-
 .../apache/nutch/protocol/http/api/HttpBase.java   | 11 ++++++++++-
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --cc src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
index 1cb2bb1,145a8ae..0bfbff4
--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
@@@ -185,13 -166,10 +193,14 @@@ public abstract class HttpBase implemen
          .trim();
      this.acceptCharset = conf.get("http.accept.charset", acceptCharset).trim();
      this.accept = conf.get("http.accept", accept).trim();
+     this.mimeTypes = new MimeUtil(conf);
      // backward-compatible default setting
      this.useHttp11 = conf.getBoolean("http.useHttp11", false);
 +    this.useHttp2 = conf.getBoolean("http.useHttp2", false);
      this.responseTime = conf.getBoolean("http.store.responsetime", true);
 +    this.storeIPAddress = conf.getBoolean("store.ip.address", false);
 +    this.storeHttpRequest = conf.getBoolean("store.http.request", false);
 +    this.storeHttpHeaders = conf.getBoolean("store.http.headers", false);
      this.enableIfModifiedsinceHeader = conf.getBoolean("http.enable.if.modified.since.header", true);
      this.enableCookieHeader = conf.getBoolean("http.enable.cookie.header", true);
      this.robots.setConf(conf);

-- 
To stop receiving notification emails like this one, please contact
snagel@apache.org.