From 0d280b9011568abf2c5f95a33fd20195b91528d9 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Tue, 20 Jul 2010 14:58:47 -0700 Subject: Bug 579514: Make Bug.attachments also return attachment data r=dkl, a=mkanat --- Bugzilla/WebService/Server/JSONRPC.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Bugzilla/WebService/Server/JSONRPC.pm') 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; } -- cgit v1.2.3-24-g4f1b