Search code examples
perlhttpgetlwplwp-useragent

Perl Error: X-Died: Missing newline after chunk data:


While trying to get a webpage using LWP::UserAgent I am getting the following error

X-Died: Missing newline after chunk data: 'OeXk0Yk1iRVhX.<Lot of this>...pOnR5cGU9InhzOnN' at /usr/share/perl5/Net/HTTP/Methods.pm line 481.

To make things worse, it doesn't show up all the time.I am able to 'Get' the web page properly many times. Could someone shed some light on the issue ? Is it a bug in the Perl Module ? Is there a work around for this issue ?


Solution

  • This error is the cause of a bug likely from your version of Net::HTTP. There have been similar cases of this in the past. Download the newest version of this from CPAN or download the patch to fix this.

    This bug could also be related to LWP::UserAgent cuts chunked response sent through HTTPS