Apache2-Translation
view release on metacpan or search on metacpan
lib/Apache2/Translation/Admin.pm view on Meta::CPAN
}
unless( defined $I->provider ) {
$I->_fetch_provider_LWP if(length $I->provider_url);
die "ERROR: Cannot resolve translation provider\n"
unless(ref $I->provider);
}
$r=Apache2::Request->new($r);
$r->content_type('text/html; charset=UTF-8');
my $a=$r->param('a');
if( $a eq '' ) {
return $I->xindex($r);
} elsif( $a eq 'fetch' ) {
return $I->xfetch($r);
} elsif( $a eq 'update' ) {
return $I->xupdate($r);
} else {
return Apache2::Const::NOT_FOUND;
lib/Apache2/Translation/Admin/prototype.js view on Meta::CPAN
setRequestHeaders: function() {
var headers = {
'X-Requested-With': 'XMLHttpRequest',
'X-Prototype-Version': Prototype.Version,
'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
};
if (this.method == 'post') {
headers['Content-type'] = this.options.contentType +
(this.options.encoding ? '; charset=' + this.options.encoding : '');
/* Force "Connection: close" for older Mozilla browsers to work
* around a bug where XMLHttpRequest sends an incorrect
* Content-length header. See Mozilla Bugzilla #246651.
*/
if (this.transport.overrideMimeType &&
(navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
headers['Connection'] = 'close';
}
( run in 0.404 second using v1.01-cache-2.11-cpan-4d50c553e7e )