Subject: | POE::Component::Client::UserAgent |
Date: | Thu, 21 Sep 2006 01:39:11 -0700 |
To: | troc+pcua [...] pobox.com |
From: | "David Roe" <roe.david [...] gmail.com> |
Hi Rocco,
I have been using this package for a while now, and have been able to
track return codes to see whether the page loads or not.
Today, the server I'm requesting from is serving up a lot of HTTP 500
return codes, and I've been having trouble handling them. I've
drilled down the debug output and found myself looking at line 311 of
UserAgent.pm.
For one reason or another, I am getting two responses for a single
request, both of them are 500 return codes. The first one is handled
as expected, but at line 328, the postback is set to undef. When the
second response is handled, there is no postback to call, and the
program dies with:
Can't use string ("") as a subroutine ref while "strict refs" in use
at /usr/lib/perl5/site_perl/5.8.6/POE/Component/Client/UserAgent.pm
line 311.
If I wrap it all up in a "if ( $entry -> postback ) { ... }" block,
part of my problem is solved - the program does not die.
The other part of my problem is why am I getting two 500 responses? I
doubt that this part has anything to do with PoCoCl::UserAgent, and
probably has more to do with the server that is spitting them out, or
a circular reference, which your comments mention.
So, this is a bug report about line 311, although probably only
triggered by another bug somewhere up (down?) the stack, and my work-
around. From my point of view, my bug came out of nowhere and had me
baffled for a couple of hours. As this is where I ended, I thought
you might want to consider it yourself.
Regards,
/dave