Skip Menu |

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

Report information
The Basics
Id: 7907
Status: resolved
Priority: 0/
Queue: POE-Component-SSLify

People
Owner: Nobody in particular
Requestors: mrdamnfrenchy [...] yahoo.com
Cc:
AdminCc:

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



Subject: HTTPS get dies with strange error about children processes on windows
On windows, using Activeperl. Version 0.65 of PoCo::Client::HTTP. When doing a get using HTTPS, I got a "No child processes" error when sending the request. However, if I had TRACE_EVENTS enabled, it worked fine. As it turns out, it's because $session->ID clears the $! variable. So, after tracing that down, it turns out Wheel::ReadWrite doesn't like it if $! has an error after calling $driver->flush. Can't blame it. In turns, $driver->flush calls syswrite on the PoCo::Client::HTTP::SSL handle, which doesn't reset $! before proceeding. (I checked, if you call perl's syswrite, $! is reset if everything went well). So, two days of debugging later, the fix is simple, in POE::Component::HTTP::SSL, add this line: $! = 0; # Clear $! before anything else near the beginning of the READ and WRITE function. This whole thing worked on Linux before, so I'll assume it still works... -Mathieu
[guest - Wed Oct 6 13:08:19 2004]: Show quoted text
> On windows, using Activeperl. Version 0.65 of PoCo::Client::HTTP. > > When doing a get using HTTPS, I got a "No child processes" error when > sending the request. However, if I had TRACE_EVENTS enabled, it > worked fine. > > As it turns out, it's because $session->ID clears the $! variable. > > So, after tracing that down, it turns out Wheel::ReadWrite doesn't > like it if $! has an error after calling $driver->flush. Can't > blame it. > > In turns, $driver->flush calls syswrite on the PoCo::Client::HTTP::SSL > handle, which doesn't reset $! before proceeding. (I checked, if > you call perl's syswrite, $! is reset if everything went well). > > So, two days of debugging later, the fix is simple, in > POE::Component::HTTP::SSL, add this line: > > $! = 0; # Clear $! before anything else > > near the beginning of the READ and WRITE function. > > This whole thing worked on Linux before, so I'll assume it still > works...
Aw, heck. I moved this ticket to POE::Component::SSLify's queue because Client::HTTP uses that for SSL now. I should have closed the ticket instead. POE::Driver::SysRW resets $! in flush() if syswrite() succeeds. Since I'm not an administrative watcher for the POE-Component-SSLify queue, I can't close this ticket myself.
Date: Thu, 07 Jul 2005 22:53:19 -0700
From: Apocalypse <apocalypse [...] 0ne.us>
To: bug-POE-Component-SSLify [...] rt.cpan.org
Subject: Re: [cpan #7907] HTTPS get dies with strange error about children processes on windows
RT-Send-Cc:
via RT wrote: Show quoted text
>This message about POE-Component-SSLify was sent to you by RCAPUTO <RCAPUTO@cpan.org> via rt.cpan.org > >Full context and any attached attachments can be found at: ><URL: https://rt.cpan.org/Ticket/Display.html?id=7907 > > >[guest - Wed Oct 6 13:08:19 2004]: > > >
>>On windows, using Activeperl. Version 0.65 of PoCo::Client::HTTP. >> >>When doing a get using HTTPS, I got a "No child processes" error when >> sending the request. However, if I had TRACE_EVENTS enabled, it >> worked fine. >> >>As it turns out, it's because $session->ID clears the $! variable. >> >>So, after tracing that down, it turns out Wheel::ReadWrite doesn't >> like it if $! has an error after calling $driver->flush. Can't >> blame it. >> >>In turns, $driver->flush calls syswrite on the PoCo::Client::HTTP::SSL >> handle, which doesn't reset $! before proceeding. (I checked, if >> you call perl's syswrite, $! is reset if everything went well). >> >>So, two days of debugging later, the fix is simple, in >> POE::Component::HTTP::SSL, add this line: >> >> $! = 0; # Clear $! before anything else >> >>near the beginning of the READ and WRITE function. >> >>This whole thing worked on Linux before, so I'll assume it still >> works... >> >>
> >Aw, heck. I moved this ticket to POE::Component::SSLify's queue because >Client::HTTP uses that for SSL now. I should have closed the ticket >instead. POE::Driver::SysRW resets $! in flush() if syswrite() succeeds. > >Since I'm not an administrative watcher for the POE-Component-SSLify >queue, I can't close this ticket myself. > > > > >
Haha, I'll go ahead and close the ticket, thanks for "resolving" it for me ;) -- Apocalypse Homepage: http://JiNxEdStAr.0ne.us IRC: Apocalypse@irc.perl.org IRC: Apocalypse@irc.freenode.net Perl Stuff: http://search.cpan.org/~APOCAL/