Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 19106
Status: resolved
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: ewaters [...] uarc.com
Cc:
AdminCc:

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



Subject: Bug in POE::Component::Client::TCP
Date: Fri, 5 May 2006 15:02:34 -0600
To: rcaputo [...] pobox.com
From: Eric Waters <ewaters [...] uarc.com>
Rocco, I'd like to submit the following fix for POE/Component/Server/TCP.pm: Add "my $sub_instantiate_filters = sub {" onto line 112, after " if (defined $client_input) {". Add "return @filters;\n}" onto line 186 after the filters have been instantiated. Replace "@filters," on line 264 with a call to this anon subroutine "$sub_instantiate_filters->()," This will fix a problem I've run into with the code, wherein using filters which expect to be instantiated for each client connecting (i.e., POE::Filter::XML which maintains a running buffer of partial XML data) don't work right. As far as I can tell, new instances of POE::Filter::*'s are supposed to be created upon each client, and not at the time of the Component (or Session) being created. Eric -- Email signed with GnuPG key id 0x7FE92A42 http://www.vegcrew.net/~ewaters/pubkey.asc
If you could submit a test case, that would be great. We've been getting into the mode of fixing things and supplying a test to the test suite to make sure it works, and will work in the future. Danke On Fri May 05 17:09:30 2006, ewaters@uarc.com wrote: Show quoted text
> Rocco, > > I'd like to submit the following fix for POE/Component/Server/TCP.pm: > > Add "my $sub_instantiate_filters = sub {" onto line 112, after " > if (defined $client_input) {". > Add "return @filters;\n}" onto line 186 after the filters have > been instantiated. > Replace "@filters," on line 264 with a call to this anon > subroutine "$sub_instantiate_filters->()," > > This will fix a problem I've run into with the code, wherein using > filters which expect to be instantiated for each client connecting > (i.e., POE::Filter::XML which maintains a running buffer of partial > XML data) don't work right. As far as I can tell, new instances of > POE::Filter::*'s are supposed to be created upon each client, and not > at the time of the Component (or Session) being created. > > Eric
Subject: Re: [rt.cpan.org #19106] Bug in POE::Component::Client::TCP
Date: Sun, 7 May 2006 18:45:42 -0600
To: Matt Sickler via RT <bug-POE [...] rt.cpan.org>
From: Eric Waters <ewaters [...] uarc.com>
I don't know enough about POE to write a test script. My first idea would be to create a test server (and test minimal filter package, maybe using base of POE::Filter::Text) which spawns off, and then create a test client which connects once, sends data, then disconnects and connects again and checks if the previous data is still in the buffer. But I don't know how to do this. On Fri, May 05, 2006 at 09:29:28PM -0400, Matt Sickler via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=19106 > > > If you could submit a test case, that would be great. > We've been getting into the mode of fixing things and supplying a test > to the test suite to make sure it works, and will work in the future. > Danke > > On Fri May 05 17:09:30 2006, ewaters@uarc.com wrote:
> > Rocco, > > > > I'd like to submit the following fix for POE/Component/Server/TCP.pm: > > > > Add "my $sub_instantiate_filters = sub {" onto line 112, after " > > if (defined $client_input) {". > > Add "return @filters;\n}" onto line 186 after the filters have > > been instantiated. > > Replace "@filters," on line 264 with a call to this anon > > subroutine "$sub_instantiate_filters->()," > > > > This will fix a problem I've run into with the code, wherein using > > filters which expect to be instantiated for each client connecting > > (i.e., POE::Filter::XML which maintains a running buffer of partial > > XML data) don't work right. As far as I can tell, new instances of > > POE::Filter::*'s are supposed to be created upon each client, and not > > at the time of the Component (or Session) being created. > > > > Eric
> > > > >
-- Email signed with GnuPG key id 0x7FE92A42 http://www.vegcrew.net/~ewaters/pubkey.asc
Download (untitled)
application/pgp-signature 189b

Message body not shown because it is not plain text.