Re: libwww-perl-5.53_90
Gisle Aas (gisle@activestate.com)
19 Apr 2001 08:39:09 -0700
Julian Monteiro <julian@buscape.com.br> writes:
> How can I do that ? I tried to use:
>
> $url->scheme('http11');
>
> and do the request, but I got a error message:
> LWP::UserAgent::request: ()
> LWP::UserAgent::simple_request: GET http11://testehost/index.html
> LWP::UserAgent::_need_proxy: Not proxied
> "my" variable @h masks earlier declaration in same scope at
> /usr/lib/perl5/site_perl/5.6.0/LWP/Protocol/http11.pm line 254.
> Can't locate object method "host" via package "URI::_foreign" at
> /usr/lib/perl5/site_perl/5.6.0/URI/WithBase.pm line 48.
>
> So I forced to use scheme http11 on UserAgent.pm with sucess, but I think I'm
> doing some mistakes
The way to tell LWP to use this module for HTTP is to add these
statements to the beginning of your script:
use LWP;
require LWP::Protocol::http11;
LWP::Protocol::implementor('http', 'LWP::Protocol::http11');
and then you go on as usual. You should not use "http11://..."-URIs.
This is "documented" in the comment at the top of the
LWP/Protocol/http11.pm file :-)
Looks like there is also a '"my" variable @h masks' warning to fix.
Regards,
Gisle