Re: LWP::Protocol::http bug with SSL returning 500 Can't read entity body

Gisle Aas <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
"Wilson Snyder" <[email protected]> writes:

> I'm using libwww-perl-5.805.tar.gz.
>
> Running code like this to get a page:
> 
>     use WWW::Mechanize;
>     our $Mech = WWW::Mechanize->new();
>     #$Mech->get("https://library.minlib.net:443/patroninfo/");
> 
> Returns a "500 Can't read entity body: " error.

It doesn't fail when I tried it (even after uncommenting the get
line).  I used Crypt::SSLeay; what SSL module did you use?

> This is because the read_entity_body loop can't cope with a multi sysread
> where the last packet returned is the EOF alone.

I don't understand this.  What is the sequence of sysread returns in
this case?  EOF is different from a failed read.

> It's the first time I've poked in this code, so this may be off, but one
> possible patch that fixes it is below.

The loop in LWP::Protocol::http is correct so I will not patch it.
The error is at a different level; either in read_entity_body() or
in the SSL module.

Regards,
Gisle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.