diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-20 23:58:47 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-20 23:58:47 +0200 |
commit | 0d280b9011568abf2c5f95a33fd20195b91528d9 (patch) | |
tree | f08cd0a72cc845e7577f863f86ef7ade48f6a563 /Bugzilla/WebService/Server | |
parent | 69be160f92f1d20408c0e390610dffbd619f63cb (diff) | |
download | bugzilla-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')
-rw-r--r-- | Bugzilla/WebService/Server/JSONRPC.pm | 7 |
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; } |