Subject: | Net-HTTP chunked decoding bug |
Date: | Thu, 26 Jan 2012 13:26:35 -0500 |
To: | bug-Net-HTTP [...] rt.cpan.org |
From: | Bryce Nichols <bni [...] mail.med.upenn.edu> |
I believe I've found a bug in v6.02 of Net-HTTP
near the end of the code for chunked encoding in Methods.pm there is
something like:
|||$n| |= my_read(||$self||, $||$buf_ref||, ||$n||);|
|||return| |undef| |unless| |defined| |$n||;|
|||${*||$self||}{||'http_chunked'||} = ||$chunked| |- ||$n||;|
The problem is that if the read call gets interrupted then the chunk
state is discarded and the next invocation of read_entity_body will
fail, since the state no longer matches the position within the stream.
I think this may be related to the issue reported in:
https://rt.cpan.org/Public/Bug/Display.html?id=72790#txn-1018088
--bryce