in reply to Re: Why might LWP::UserAgent be failing with '500 EOF'?
in thread Why might LWP::UserAgent be failing with '500 EOF'?
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.
my $socket = $self->_new_socket($host, $port, $timeout); $socket = $self->_new_socket($host, $port, $timeout); # my duplicat +ive line # such that $socket clobbers the 'my $socket' and so is not based + on "0"?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why might LWP::UserAgent be failing with '500 EOF'?
by andylockran (Initiate) on May 17, 2010 at 09:36 UTC |