summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Server/JSONRPC.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-20 23:58:47 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-20 23:58:47 +0200
commit0d280b9011568abf2c5f95a33fd20195b91528d9 (patch)
treef08cd0a72cc845e7577f863f86ef7ade48f6a563 /Bugzilla/WebService/Server/JSONRPC.pm
parent69be160f92f1d20408c0e390610dffbd619f63cb (diff)
downloadbugzilla-0d280b9011568abf2c5f95a33fd20195b91528d9.tar.gz
bugzilla-0d280b9011568abf2c5f95a33fd20195b91528d9.tar.xz
Bug 579514: Make Bug.attachments also return attachment data
r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/WebService/Server/JSONRPC.pm')
-rw-r--r--Bugzilla/WebService/Server/JSONRPC.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/WebService/Server/JSONRPC.pm b/Bugzilla/WebService/Server/JSONRPC.pm
index 3ff875361..b55194fda 100644
--- a/Bugzilla/WebService/Server/JSONRPC.pm
+++ b/Bugzilla/WebService/Server/JSONRPC.pm
@@ -29,7 +29,7 @@ use Bugzilla::WebService::Constants;
use Bugzilla::WebService::Util qw(taint_data);
use Bugzilla::Util qw(correct_urlbase trim);
-use MIME::Base64 qw(decode_base64);
+use MIME::Base64 qw(decode_base64 encode_base64);
#####################################
# Public JSON::RPC Method Overrides #
@@ -191,7 +191,10 @@ sub type {
# ISO-8601 "YYYYMMDDTHH:MM:SS" with a literal T
$retval = $self->datetime_format_outbound($value);
}
- # XXX Will have to implement base64 if Bugzilla starts using it.
+ elsif ($type eq 'base64') {
+ utf8::encode($value) if utf8::is_utf8($value);
+ $retval = encode_base64($value, '');
+ }
return $retval;
}