aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory
diff options
context:
space:
mode:
authorlbsa712009-03-31 05:51:28 +0000
committerlbsa712009-03-31 05:51:28 +0000
commitfb9a358b797418fbc4c38dd9ec67e12bb5b7c98a (patch)
tree76d79c2b83945f40026e0dbb7558e909da173a43 /OpenSim/ApplicationPlugins/Rest/Inventory
parentThanks rtomita for a patch to add a handler for the RemoveInventoryObjects pa... (diff)
downloadopensim-SC_OLD-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.zip
opensim-SC_OLD-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.tar.gz
opensim-SC_OLD-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.tar.bz2
opensim-SC_OLD-fb9a358b797418fbc4c38dd9ec67e12bb5b7c98a.tar.xz
* Refactored out and de-duplicated Base64ToString(string)
* Fixed minor typo
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs8
1 files changed, 1 insertions, 7 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs
index 62e18c4..748f20a 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs
@@ -444,15 +444,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
444 444
445 public static string Base64ToString(string str) 445 public static string Base64ToString(string str)
446 { 446 {
447 UTF8Encoding encoder = new UTF8Encoding();
448 Decoder utf8Decode = encoder.GetDecoder();
449 try 447 try
450 { 448 {
451 byte[] todecode_byte = Convert.FromBase64String(str); 449 return Util.Base64ToString(str);
452 int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
453 char[] decoded_char = new char[charCount];
454 utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
455 return new String(decoded_char);
456 } 450 }
457 catch 451 catch
458 { 452 {