summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch')
-rw-r--r--net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch b/net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch
new file mode 100644
index 000000000000..547af04db5b7
--- /dev/null
+++ b/net-analyzer/chaosreader/files/chaosreader-0.94-chunkcheck.patch
@@ -0,0 +1,27 @@
+--- 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 http://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);