Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Why might LWP::UserAgent be failing with '500 EOF'?by ff (Hermit) |
on Apr 18, 2006 at 04:11 UTC ( [id://543996]=note: print w/replies, xml ) | Need Help?? |
Hi ikegami, Thanks for the suggestion to look in file LWP/Protocol/http.pm. I started trying tricks with Dumper on various sections, and thinking and googling led to the posting of #14028: Bug (leak?) with IO::Select object creation?. There, the OP makes three different sockets and notices upon Dumping them that:
We create three IO::Select objects in the same way but each object is slightly bigger than the last. Surely each object should be the same size? The same behavior occurs on either Win32 or Solaris.Graham Barr answers that That is because IO::select uses the system file number of the handle passed to store the filehandle reference in an array. So the array object will be as big as the file number of the filehandle passed in.Okay, please tell me I've misunderstood this, but suppose the file number of the filehandle passed in was "0", does that mean some kind of empty array object will be floating around causing my EOF problem? In fact, when I edit http.pm by duplicating the socket creation line, my program works, i.e.
So, 1) what is Graham saying above, 2) why does my "fix" work, and 3) might there be a way to avoid altering the http.pm module? I suppose submitting this as a bug is the path I will tread.... Thanks.
In Section
Seekers of Perl Wisdom
|
|