Re: POE useragent and https

2002-11-08 Thread poelist
 Has anyone gotten POE::Component::Client::UserAgent to work with
 SSL/HTTPS pages? I've disabled nonblocking, and Net::SSL is being
 used, but I still get a failure after a few bytes are read. Is there
 anything else I can do, or am I out of luck?

I was trying to make it work with HTTPS, and after a few rounds
gave up on it. If turning non-blocking connects off does not help,
fork a process and run LWP or LWP::PUA in it. Or try PoCoCl::HTTP.

There may be a different way to create or handle sockets that
could improve things a bit, but otherwise I don't think it's an LWP
or LWP::PUA or PoCoCl::UA problem. The underlying SSL libraries
just don't like non-blocking sockets at all. You can try filing bugs
against them.

But the other thing is, the way LWP and LWP::PUA are designed it's
pretty much impossible to make them truly POE-friendly. For
example, an FTP request will block for the entire duration of the
connection establishment phase. So a future version of PoCoCl::UA
should do away with the LWP dependency entirely.

-- Kirill
---
Email sent using AnyEmail (http://netbula.com/anyemail/)



Re: POE useragent and https

2002-11-08 Thread Peter Chen
On Fri, 2002-11-08 at 15:16, [EMAIL PROTECTED] wrote:
 I was trying to make it work with HTTPS, and after a few rounds
 gave up on it. If turning non-blocking connects off does not help,
 fork a process and run LWP or LWP::PUA in it. Or try PoCoCl::HTTP.
 
 There may be a different way to create or handle sockets that
 could improve things a bit, but otherwise I don't think it's an LWP
 or LWP::PUA or PoCoCl::UA problem. The underlying SSL libraries
 just don't like non-blocking sockets at all. You can try filing bugs
 against them.

Interesting, in fact, I have done that.  I have a component that runs in
POE::Wheel::Run that calls LWP, and use Cache::Cache to pass back the
response.  I consider it a kludge though.

The curious part is, if the problem is the underlying SSL library.  Then
how does PoCoCL::HTTP work with it at all?  You see the conflict in this
logic.  After all, the same SSL libray is used.

 But the other thing is, the way LWP and LWP::PUA are designed it's
 pretty much impossible to make them truly POE-friendly. For
 example, an FTP request will block for the entire duration of the
 connection establishment phase. So a future version of PoCoCl::UA
 should do away with the LWP dependency entirely.

To do away w/ LWP totally may not be so easy.  One reason is that it has
become somewhat of a standard.  People expect the same API's for the
request, response, and UserAgent.  I wonder whether it's possible to
change the low level code so a fix similar to what PoCoCl::HTTP uses can
be adapted.

Pete





Re: POE useragent and https

2002-11-07 Thread Rocco Caputo
On Thu, Nov 07, 2002 at 11:05:28AM -0800, Lenny Rachitsky wrote:

 Has anyone gotten POE::Component::Client::UserAgent to work with
 SSL/HTTPS pages? I've disabled nonblocking, and Net::SSL is being
 used, but I still get a failure after a few bytes are read. Is there
 anything else I can do, or am I out of luck?
 
 Any help at all would be very much appreciated.

We discussed this in IRC, and I spent a long look at the bowels of LWP
to no avail.  Maybe someone else can figure it out, but I'm totally at
a loss.

POE::Component::Client::HTTP works, however.

-- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/




Re: POE useragent and https

2002-11-07 Thread Peter Chen
On Thu, 2002-11-07 at 21:47, Rocco Caputo wrote:
 On Thu, Nov 07, 2002 at 11:05:28AM -0800, Lenny Rachitsky wrote:
 
  Has anyone gotten POE::Component::Client::UserAgent to work with
  SSL/HTTPS pages? I've disabled nonblocking, and Net::SSL is being
  used, but I still get a failure after a few bytes are read. Is there
  anything else I can do, or am I out of luck?
  
  Any help at all would be very much appreciated.
 
 We discussed this in IRC, and I spent a long look at the bowels of LWP
 to no avail.  Maybe someone else can figure it out, but I'm totally at
 a loss.
 
 POE::Component::Client::HTTP works, however.

Perhaps we can build on each other's experience.  Several of us have
looked into this problem.  

Is POE::Component::Client::UserAgent still based on LWP::ParallelUA?  I
recall a few months ago, we got in touch with the authors, and one of
them was working on a fix.

Pete