Skip Menu |

This queue is for tickets about the POE-Component-Client-UserAgent CPAN distribution.

Report information
The Basics
Id: 21599
Status: rejected
Priority: 0/
Queue: POE-Component-Client-UserAgent

People
Owner: Nobody in particular
Requestors: roe.david [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
On Thu Sep 21 11:36:17 2006, roe.david@gmail.com wrote: Show quoted text
> > 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.
Hi, Dave. Is the problem reproduceable, for example if you hit a particular URL? You're the second person to report this, but so far I haven't been able to track it down.
Subject: Re: [rt.cpan.org #21599] POE::Component::Client::UserAgent
Date: Sun, 31 Dec 2006 15:58:53 -0800
To: bug-POE-Component-Client-UserAgent [...] rt.cpan.org
From: "David Roe" <roe.david [...] gmail.com>
I just about remember the problem. It was not 100% reproducable, sorry. I don't have a UserAgent.orig on disk for me to compare, but I may have worked around it by editing UserAgent.pm around line 311: if ( $entry -> postback ) { ... } Does not cure the problem, I guess, but helped stop it crashing. Good luck tracking this one down. If you want to send me a debug version of the code, or a patch to add some debug statements, I could try running that to see whether I can find anything for you. Happy New Year! /dave On 12/31/06, via RT <bug-POE-Component-Client-UserAgent@rt.cpan.org> wrote: Show quoted text
> > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21599 > > > On Thu Sep 21 11:36:17 2006, roe.david@gmail.com wrote:
> > > > 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.
> > Hi, Dave. Is the problem reproduceable, for example if you hit a > particular URL? You're the second person to report this, but so far I > haven't been able to track it down. >
Happy new new new year! I'm sorry, but I cannot support this module anymore. LWP::Parallel no longer installs, and I don't have the resources to support it. Please let me know if you know someone who wants to contribute to LWP::Parallel and POE::Component::Client::UserAgent. If you'd like a more robust HTTP client, I recommend POE::Component::Client::HTTP. It and its dependencies are better maintained.