> This sounds like an excellent module, and I'm definitely interested in
> it.  In fact, I'd like to replace Client::HTTP with it if you have the
> time to finish it.

I was testing it a little bit with HTTP, and it seems to do the
right thing. I'll try to write some documentation and maybe more
test scripts, but I think it is usable already.

> I tried it with https, ftp, and http protocols simultaneously, and it
> seems to have hanged.  I'm using 5.005_03 at the moment, so maybe it
> works better in newer perls.  Do the https and ftp protocols also run
> without blocking?

https should be no different from http, but ftp is a different
story. ftp.pm uses Net::FTP, which doesn't seem to know anything
about non-blocking connect, and then the way write_request works
is by sending one command at a time and waiting for a response,
until it's ready to receive the requested file.

There are a few ways to make ftp non-blocking, none of which is
simple.

- enhance Net::FTP to support non-blocking connect, then make
  ftp::write_request send all commands at once, and handle any
  errors elsewhere. This will probably not fit in the current
  LWP structure anyway, and I'm not at all sure all FTP servers
  will be happy about this.

- try using LWPng, which has been in alpha for over two years
  (or more?). This way will probably involve more development of
  LWPng itself rather than just the POE wrapper, but the advantage
  is that HTTP/1.1 and other things will be supported.

- write an entirely new library.

> This looks like a great start for a general-purpose user agent.
> Please keep me posted on its development.

I am not sure I will be able to spend much time playing with Perl
in the coming months, so help is most welcome.

I'll try to test ftp and https urls.

Kirill

Reply via email to