--- chaosreader 2011-11-10 19:17:50.000000000 +0100 +++ chaosreader-0.94 2012-03-09 18:15:21.096105305 +0100 @@ -5350,6 +5353,24 @@ next if length($http_data) < 8; $partnum++; $parttext = sprintf("%02d",$partnum); + + ## from https://sourceforge.net/tracker/?func=detail&aid=2019799&group_id=107384&atid=647491 + ### Chunk Check + if ( $http_header =~ /Transfer-Encoding: chunked/ ) { + my $new_http_data=""; + my $chunksize=-1; + my $pos=0; + until ($chunksize==0) { + my $eolpos=index($http_data,"\r\n",$pos); + $chunksize=hex(substr($http_data,$pos,$eolpos - $pos)); + $pos=($eolpos+2); + if ($chunksize > 0) { + $new_http_data.=substr($http_data,$pos,$chunksize); + } + $pos+=($chunksize+2); + } + $http_data=$new_http_data; + } ### Part - Checks $http_type = &File_Type($http_data);