Skip Menu |

This queue is for tickets about the Net-Blogger CPAN distribution.

Report information
The Basics
Id: 2615
Status: resolved
Priority: 0/
Queue: Net-Blogger

People
Owner: Nobody in particular
Requestors: morbus [...] disobey.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.85
Fixed in: (no value)



Subject: Apache Content Negotiation Confuses Net::Blogger?
My URL for the MT/Blogger API is: http://disobey.com/cgi-bin/mt/mt-xmlrpc.cgi Since I have content-negotiation on, however, I can use the (IMO) more preferable: http://disobey.com/cgi-bin/mt/mt-xmlrpc And those will resolve correctly in the browser (any browser). However, if I use the extension-less version, Net::Blogger gives the following error: [err] Fatal client error. 406 Not Acceptable at /Library/Perl/Net/Blogger/Engine/Base.pm line 243. with the following code: my $mt = Net::Blogger->new(engine=>"movabletype"); $mt->Proxy($opts{server}); $mt->Username($opts{username}); $mt->Password($opts{password}); $mt->BlogId($opts{blogid}); # get the list of categories from the server. my $cats = $mt->mt()->getCategoryList() or die "[err] ", $mt->LastError(), "\n"; The second I add the .cgi to the end though, it works without a problem.
This is a SOAP::Lite thing, so I need to figure out where to tickle it to do the right thing and the decide how to glue it back into Net::Blogger. (see also: setting proxy servers in Net::Google) [guest - Tue May 20 21:15:03 2003]: Show quoted text
> My URL for the MT/Blogger API is: > > http://disobey.com/cgi-bin/mt/mt-xmlrpc.cgi > > Since I have content-negotiation on, however, I can use the (IMO) more > preferable: > > http://disobey.com/cgi-bin/mt/mt-xmlrpc > > And those will resolve correctly in the browser (any browser). > However, if I use > the extension-less version, Net::Blogger gives the following error: > > [err] Fatal client error. > 406 Not Acceptable at /Library/Perl/Net/Blogger/Engine/Base.pm line > 243. > > with the following code: > > my $mt = Net::Blogger->new(engine=>"movabletype"); > $mt->Proxy($opts{server}); > $mt->Username($opts{username}); > $mt->Password($opts{password}); > $mt->BlogId($opts{blogid}); > > # get the list of categories from the server. > my $cats = $mt->mt()->getCategoryList() > or die "[err] ", $mt->LastError(), "\n"; > > The second I add the .cgi to the end though, it works without a > problem.
From: sherzodr [...] handalak.com
I'm not entirely sure if it's the SOAP::Lite issue, because I could get the same thing working using Net::MovableType. I renamed my "mt-xmlrpc.cgi" file to "xmlrpc" a long time ago, and Net::MovableType seems to be working fine for me. Try it: #!/usr/bin/perl -w use strict; use Net::MovableType; my $mt = new MovableType('http://mt.handalak.com/cgi-bin/xmlrpc'); my $methods = $mt->supportedMethods(); for ( @$methods ) { printf "%s\n", $_ } __END__
The W3C lists a 406 error as one where : "[t]he resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request." Without seeing the headers it's difficult to say. If you really want, I can add a method to dig out SOAP::Lite's LWP::UA object but this sounds like a bug that would be better fixed in S:L itself. [guest - Sun Nov 30 07:01:37 2003]: Show quoted text
> I'm not entirely sure if it's the SOAP::Lite issue, because I could > get > the same thing working using Net::MovableType. > > I renamed my "mt-xmlrpc.cgi" file to "xmlrpc" a long time ago, and > Net::MovableType seems to be working fine for me. Try it: > > #!/usr/bin/perl -w > > use strict; > use Net::MovableType; > my $mt = new MovableType('http://mt.handalak.com/cgi-bin/xmlrpc'); > my $methods = $mt->supportedMethods(); > for ( @$methods ) { > printf "%s\n", $_ > } > > __END__