nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julien Nioche (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (NUTCH-1270) some of Deflate encoded pages not fetched
Date Fri, 18 Apr 2014 09:05:16 GMT

     [ https://issues.apache.org/jira/browse/NUTCH-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Julien Nioche updated NUTCH-1270:
---------------------------------

    Component/s:     (was: fetcher)
                 protocol

> some of Deflate encoded pages not fetched
> -----------------------------------------
>
>                 Key: NUTCH-1270
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1270
>             Project: Nutch
>          Issue Type: Bug
>          Components: protocol
>    Affects Versions: 1.4
>         Environment: software
>            Reporter: behnam nikbakht
>              Labels: fetch, processDeflateEncoded
>             Fix For: 1.9
>
>         Attachments: NUTCH-1270.patch
>
>
> it is a problem with some of web pages that fetched but their content can not retrived
> after this change, this error fixed
> we change lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
>   public byte[] processDeflateEncoded(byte[] compressed, URL url) throws IOException
{
>     if (LOGGER.isTraceEnabled()) { LOGGER.trace("inflating...."); }
>     byte[] content = DeflateUtils.inflateBestEffort(compressed, getMaxContent());
> +    if(content==null)
> +    	content = DeflateUtils.inflateBestEffort(compressed, 200000);
>     if (content == null)
>       throw new IOException("inflateBestEffort returned null");
>     if (LOGGER.isTraceEnabled()) {
>       LOGGER.trace("fetched " + compressed.length
>                  + " bytes of compressed content (expanded to "
>                  + content.length + " bytes) from " + url);
>     }
>     return content;
>   }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message