Gossamer Forum
Home : General : Perl Programming :

Protocol not supported

Quote Reply
Protocol not supported
After trawling through yahoo I'm still not really any closer to figuring this out.

Using LWP::UserAgent to POST to a remote URL I get:

Protocol scheme http:// is not supported (501)

This is to do with the server I'm posting to rather than the server I'm posting from right?

What actually causes this?
Quote Reply
Re: [Paul] Protocol not supported In reply to
It sounds like the installation of LWP on the machine the script is being run from is b0rked. Are there any other scripts working with LWP on that machine? Did you run all tests without errors?

Try re-installing LWP and see what happens.

- wil
Quote Reply
Re: [Wil] Protocol not supported In reply to
>>
It sounds like the installation of LWP on the machine the script is being run from is b0rked.
<<

Yeah there are other scripts working fine (infact the same one in a different vhost).
Quote Reply
Re: [Paul] Protocol not supported In reply to
I found this.

http://www.gossamer-threads.com/...forum.cgi?post=22226

--
jsu
Quote Reply
Re: [Seto Kaiba] Protocol not supported In reply to
However, I don't think that applies to you because you're not such a newb.

So, if protocol http is not found maybe your http.pm isn't working right. Is it only for POST and not GET?

--
jsu
Quote Reply
Re: [Seto Kaiba] Protocol not supported In reply to
>>
So, if protocol http is not found maybe your http.pm isn't working right. Is it only for POST and not GET?
<<

Yeah but like I said, it works in one vhost but not another :(
Quote Reply
Re: [Seto Kaiba] Protocol not supported In reply to
Poopy poop....perl 5.6.1..

rm -f config.sh Policy.sh
sh Configure -de
make
make test
make install

...still not fixed.

I guess I need to delete the modules and start again because currently it just keeps saying "LWP is up to date"
Quote Reply
Re: [Paul] Protocol not supported In reply to
Now I think about it, it seems that it is trying to use http:// as the protocol when it should be GET or POST...this may be something to do with the way I have the code. When I trim http:// from the URL I get:

URL must be absolute (400)

I'm using:

Code:
my $lwp = LWP::UserAgent->new( agent => "Secret/1.0", timeout => 25 );
my $url = "www.wiredon.net/cgi-bin/secret.cgi?foo=bar";
my $page = $lwp->request(HTTP::Request->new(GET => $url));

This just seems weird though as it did work before :(

Last edited by:

Paul: Jul 31, 2002, 5:30 PM
Quote Reply
Re: [Paul] Protocol not supported In reply to
ha. reinstall perl.

i copied your code and added

print $page->{_msg} . "\n"; and without the http:// i get same error as you but with it, it says Not Found (which is the correct response for that page)

--
jsu
Quote Reply
Re: [Seto Kaiba] Protocol not supported In reply to
Yeah but when I put the http:// back in I get "Protocol 'http' not supported"
Quote Reply
Re: [Paul] Protocol not supported In reply to
yea.. i said reinstall perl didn't i?

http is a protocol as is ftp.. maybe you should try to use lwp to download a small file on a ftp server. see if that works.

otherwise fix your LWP/Protocol/http.pm

--
jsu
Quote Reply
Re: [Seto Kaiba] Protocol not supported In reply to
>>
yea.. i said reinstall perl didn't i?
<<

yeah and I said I already had didn't I ;)

I also said it worked on one site but then stopped on the other...it makes no sense.

Last edited by:

Paul: Jul 31, 2002, 6:38 PM
Quote Reply
Re: [Paul] Protocol not supported In reply to
Sorry, I've lost track of this thread -- did you try reinstalling LWP or not?

A quick search on Google usenet groups seems to suggest that as the fix for this problem.

- wil

Last edited by:

Wil: Jul 31, 2002, 7:02 PM
Quote Reply
Re: [Wil] Protocol not supported In reply to
perl -MCPAN -e 'install Bundle::LWP'

"LWP is up to date"
"URI is up to date"

....I reinstalled and recompiled perl, that didn't fix it either.

Last edited by:

Paul: Aug 1, 2002, 2:36 AM
Quote Reply
Re: [Paul] Protocol not supported In reply to
perl -MCPAN -e 'force install Bundle::LWP'

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Protocol not supported In reply to
But I don't understand if it is up to date, why would it not work, and why does it work on wiredon but not another domain on the same server :(

I'll try forcing it now, thanks.
Quote Reply
Re: [yogi] Protocol not supported In reply to
[root@paul /root]# perl -MCPAN -e 'force install Bundle::LWP'
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Sat, 13 Jul 2002 16:10:20 GMT
MIME::Base64 is up to date.
Digest::MD5 is up to date.
URI is up to date.
Net::FTP is up to date.
HTML::Tagset is up to date.
HTML::Parser is up to date.
HTML::HeadParser is up to date.
LWP is up to date.
[root@paul /root]#
Quote Reply
Re: [yogi] Protocol not supported In reply to
OK I had to use the CPAN shell to get force to work.

perl -MCPAN -e shell
force install Bundle::LWP
Quote Reply
Re: [yogi] Protocol not supported In reply to
Nope still didn't work. After isntalling LWP I don't have HTTP.pm anywhere, only Net/HTTP.pm and:

/usr/local/lib/perl5/site_perl/5.6.1/LWP/Protocol/GHTTP.pm
Quote Reply
Re: [Paul] Protocol not supported In reply to
What happened when you make test ?

- wil
Quote Reply
Re: [Paul] Protocol not supported In reply to
Woooooooooo hallelujah.

I just went wild and forced everything and it fixed it Smile

Thanks yogi.

Last edited by:

Paul: Aug 1, 2002, 3:50 AM