mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-14 01:40:04 +00:00
FetchHTTP.java
Handle response header with a null or empty Content-Length
This commit is contained in:
1 parent
9e1ade3de6
commit
bf248f407b
1 file changed
+1
-1
@@ -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