Subject: | MediaWiki::API does not honor 'use_http_get' option to constructor |
MediaWiki::API doesn't honor the use_http_get option as specified in the
perldoc. This fails to work as documented:
MediaWiki::API->new ({api_url => $url, use_http_get => 1});
This is because in the module's new() method, the following value set
and never checked by the API.pm module;
$self->{config}->{use_http_get} = USE_HTTP_GET;
I changed the above to:
$self->{config}->{use_http_get} = USE_HTTP_GET
unless ( defined $self->{config}->{use_http_get} );
and that config option is being honored now.
I need to use HTTP GET because our MediaWiki instance is protected by an
external authentication mechanism that uses HTTP Basic Authentication,
and LWP::UserAgent doesn't know what to do with the page output from the
external authentication tool when try to use an HTTP POST URL to talk to
the MediaWiki server without being authenticated.
System details:
MediaWiki-API-0.30
Red Hat Enterprise Server 5.4
$ perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi