check_chunked revision 09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1
# This is meant to be used on the raw output of an HTTP/1.1 connection
# to check that the chunks are all correctly laid out. It's easiest
# to use a tool like netcat to generate the output. This script
# *insists* that \r exist in the output.
#
use strict;
my $is_chunked = 0;
# must toss headers
while(<>) {
$is_chunked = 1;
}
}
for(;;) {
m#^([0-9a-f]+) *\r$#i || die "bogus chunklen: $_";
print "$_ ";
}