"Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> writes:

> On Jul 13, Gisle Aas said:
> 
> >"Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> writes:
> >
> >> I'm going to release these subclasses, but I'd like to know if the libwww
> >> suite can perhaps be rewritten in the future to allow for this type of
> >> thing...
> >
> >It is already sort of supported.  You can set the outgoing address by
> >tweaking the @LWP::Protocol::http::EXTRA_SOCK_OPTS.  What is your suggested
> >change to support this?
> 
> (That's not in the FTP protocol module, by the way...)

I know :(

> I see that, and I'm using it in my subclass, but it's a matter of getting
> the stuff *to* &EXTRA_SOCK_OPTS.  The data (the array of IPs to use)
> shouldn't necessarily belong to the LWP::Protocol::http subclass; I'd
> expect it to belong to the LWP::UserAgent object, or in this case, the
> HTTP::Proxy object.

Either that or we could attach it to the request object.  Attaching it
to the request give more flexibility and it could potentially be
defaulted from the $ua->default_header settings.

> And I haven't found a way to create my own LWP::Protocol::http subclass
> that is used instead of the original one.  That's why I had to subclass
> LWP::UserAgent and LWP::Protocol as well.

You should be able to override protocol handlers with:

   LWP::Protocol::implementor("http", "MyClass")

> The server I did my work on is currently down, but I'll provide my code
> tomorrow.

Ok, I'll take a look then.

Regards,
Gisle

Reply via email to