mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-13 17:26:01 +00:00
FetchHTTP.java
Handle response header with a null or empty Content-Length
This commit is contained in:
@@ -669,7 +669,7 @@ public class FetchHTTP extends Processor implements Lifecycle {
|
||||
|
||||
long contentLength = -1l;
|
||||
Header h = response.getLastHeader("content-length");
|
||||
if (h != null) {
|
||||
if (h != null && h.getValue().trim().length()>0) {
|
||||
contentLength = Long.parseLong(h.getValue());
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user