Subject: | Illegal hexadecimal digit ' ' ignored warning in Net/Async/Protocol/HTTP.pm |
Date: | Sun, 25 Nov 2012 16:40:01 +0000 |
To: | bug-Net-Async-HTTP [...] rt.cpan.org |
From: | David Leadbeater <dgl [...] dgl.cx> |
Some servers seem to add trailing whitespace on the chunk-size. Here's part
of a trace, "5d" being the size here:
00002094 22 64 65 67 72 65 0d 0a 35 64 20 0d 0a 65 73 22 "degre.. 5d ..es"
000020A4 3a 20 33 34 30 0a 09 09 7d 2c 0a 09 09 22 61 76 : 340... },..."av
I stopped the warning by changing line 238 to:
if( !defined $chunk_length and $$buffref =~
s/^([A-Fa-f0-9]+).*?$CRLF// ) {
(Note it is swallowing a chunk-extension if one exists, but then I'm not
aware of them actually being used...).