You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Ferdy (JIRA)" <ji...@apache.org> on 2011/08/25 14:50:29 UTC

[jira] [Created] (NUTCH-1096) Empty (not null) ContentLength results in failure of fetch

Empty (not null) ContentLength results in failure of fetch
----------------------------------------------------------

                 Key: NUTCH-1096
                 URL: https://issues.apache.org/jira/browse/NUTCH-1096
             Project: Nutch
          Issue Type: Bug
          Components: fetcher
    Affects Versions: 1.3
            Reporter: Ferdy
            Priority: Minor


In rare occasions, servers return an empty string ContentLength, which results in a fetch failure. One could argue whether the fetch is allowed to proceed in these cases. I for one believe it is. (Just like the cases where the header is null or not properly trimmed).

Patch will be right up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (NUTCH-1096) Empty (not null) ContentLength results in failure of fetch

Posted by "Ferdy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NUTCH-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ferdy updated NUTCH-1096:
-------------------------

    Attachment: NUTCH-1096-v1.patch

> Empty (not null) ContentLength results in failure of fetch
> ----------------------------------------------------------
>
>                 Key: NUTCH-1096
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1096
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher
>    Affects Versions: 1.3
>            Reporter: Ferdy
>            Priority: Minor
>         Attachments: NUTCH-1096-v1.patch
>
>
> In rare occasions, servers return an empty string ContentLength, which results in a fetch failure. One could argue whether the fetch is allowed to proceed in these cases. I for one believe it is. (Just like the cases where the header is null or not properly trimmed).
> Patch will be right up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (NUTCH-1096) Empty (not null) ContentLength results in failure of fetch

Posted by "Markus Jelsma (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NUTCH-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Jelsma updated NUTCH-1096:
---------------------------------

    Fix Version/s: 2.0
                   1.4

> Empty (not null) ContentLength results in failure of fetch
> ----------------------------------------------------------
>
>                 Key: NUTCH-1096
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1096
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher
>    Affects Versions: 1.3
>            Reporter: Ferdy
>            Priority: Minor
>             Fix For: 1.4, 2.0
>
>         Attachments: NUTCH-1096-v1.patch
>
>
> In rare occasions, servers return an empty string ContentLength, which results in a fetch failure. One could argue whether the fetch is allowed to proceed in these cases. I for one believe it is. (Just like the cases where the header is null or not properly trimmed).
> Patch will be right up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NUTCH-1096) Empty (not null) ContentLength results in failure of fetch

Posted by "Ferdy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NUTCH-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093762#comment-13093762 ] 

Ferdy commented on NUTCH-1096:
------------------------------

I do not have an example anymore (the corresponding url seems to be fixed).

It is easy reproducable just by analyzing/executing some test code. The following code 

String contentLengthString="";
if (contentLengthString != null) {
  contentLengthString = contentLengthString.trim();
  try {
    contentLength = Integer.parseInt(contentLengthString);
  } catch (NumberFormatException e) {
   e.printStackTrace();
  }
}

throws the following exception


java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:470)
	at java.lang.Integer.parseInt(Integer.java:499)
	at ...


> Empty (not null) ContentLength results in failure of fetch
> ----------------------------------------------------------
>
>                 Key: NUTCH-1096
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1096
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher
>    Affects Versions: 1.3
>            Reporter: Ferdy
>            Priority: Minor
>             Fix For: 1.4, 2.0
>
>         Attachments: NUTCH-1096-v1.patch
>
>
> In rare occasions, servers return an empty string ContentLength, which results in a fetch failure. One could argue whether the fetch is allowed to proceed in these cases. I for one believe it is. (Just like the cases where the header is null or not properly trimmed).
> Patch will be right up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (NUTCH-1096) Empty (not null) ContentLength results in failure of fetch

Posted by "Markus Jelsma (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NUTCH-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093654#comment-13093654 ] 

Markus Jelsma commented on NUTCH-1096:
--------------------------------------

by the way: can you also provide a an url with which i can reproduce? I also didn't come up with a reproducable url for NUTCH-1039.

> Empty (not null) ContentLength results in failure of fetch
> ----------------------------------------------------------
>
>                 Key: NUTCH-1096
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1096
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher
>    Affects Versions: 1.3
>            Reporter: Ferdy
>            Priority: Minor
>             Fix For: 1.4, 2.0
>
>         Attachments: NUTCH-1096-v1.patch
>
>
> In rare occasions, servers return an empty string ContentLength, which results in a fetch failure. One could argue whether the fetch is allowed to proceed in these cases. I for one believe it is. (Just like the cases where the header is null or not properly trimmed).
> Patch will be right up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (NUTCH-1096) Empty (not null) ContentLength results in failure of fetch

Posted by "Julien Nioche (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NUTCH-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Nioche resolved NUTCH-1096.
----------------------------------

    Resolution: Fixed

trunk : Committed revision 1164107
1.4 : Committed revision 1164108

Thanks Ferdy!

> Empty (not null) ContentLength results in failure of fetch
> ----------------------------------------------------------
>
>                 Key: NUTCH-1096
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1096
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher
>    Affects Versions: 1.3
>            Reporter: Ferdy
>            Priority: Minor
>             Fix For: 1.4, 2.0
>
>         Attachments: NUTCH-1096-v1.patch
>
>
> In rare occasions, servers return an empty string ContentLength, which results in a fetch failure. One could argue whether the fetch is allowed to proceed in these cases. I for one believe it is. (Just like the cases where the header is null or not properly trimmed).
> Patch will be right up.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (NUTCH-1096) Empty (not null) ContentLength results in failure of fetch

Posted by "Markus Jelsma (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NUTCH-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Jelsma closed NUTCH-1096.
--------------------------------


Bulk close of resolved issues of 1.4. bulkclose-1.4-20111220
                
> Empty (not null) ContentLength results in failure of fetch
> ----------------------------------------------------------
>
>                 Key: NUTCH-1096
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1096
>             Project: Nutch
>          Issue Type: Bug
>          Components: fetcher
>    Affects Versions: 1.3
>            Reporter: Ferdy Galema
>            Priority: Minor
>             Fix For: 1.4, nutchgora
>
>         Attachments: NUTCH-1096-v1.patch
>
>
> In rare occasions, servers return an empty string ContentLength, which results in a fetch failure. One could argue whether the fetch is allowed to proceed in these cases. I for one believe it is. (Just like the cases where the header is null or not properly trimmed).
> Patch will be right up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira