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