# HG changeset patch # User Matthew Wild # Date 1284385640 -3600 # Node ID 5de7f66e41686c8731120ebc7c4967f0e9076d34 # Parent c0be31a5ff5598037977638f926da3f660136d45 libs/encodings.lua: Use mime.b64 for base64.encode diff -r c0be31a5ff55 -r 5de7f66e4168 libs/encodings.lua --- a/libs/encodings.lua Mon Sep 13 14:46:36 2010 +0100 +++ b/libs/encodings.lua Mon Sep 13 14:47:20 2010 +0100 @@ -1,10 +1,12 @@ local function not_impl() - error("Encoding function not implemented"); + error("Function not implemented"); end +local mime = require "mime"; + module "encodings" stringprep = {}; -base64 = { encode = not_impl, decode = not_impl }; +base64 = { encode = mime.b64, decode = not_impl }; --mime.unb64 is buggy with \0 return _M;