libs/encodings.lua

Sun, 16 Nov 2014 19:33:18 +0100

author
Kim Alvefur <zash@zash.se>
date
Sun, 16 Nov 2014 19:33:18 +0100
changeset 368
154c2f04d73b
parent 130
5de7f66e4168
child 391
b496f0262a3f
permissions
-rw-r--r--

init: Restore loading of LuaSec (must be loaded before net.server) (thanks ?)

107
59c6f2deb8ab libs/encodings.lua: Throw error when calling unimplemented function
Matthew Wild <mwild1@gmail.com>
parents: 0
diff changeset
1 local function not_impl()
130
5de7f66e4168 libs/encodings.lua: Use mime.b64 for base64.encode
Matthew Wild <mwild1@gmail.com>
parents: 107
diff changeset
2 error("Function not implemented");
107
59c6f2deb8ab libs/encodings.lua: Throw error when calling unimplemented function
Matthew Wild <mwild1@gmail.com>
parents: 0
diff changeset
3 end
59c6f2deb8ab libs/encodings.lua: Throw error when calling unimplemented function
Matthew Wild <mwild1@gmail.com>
parents: 0
diff changeset
4
130
5de7f66e4168 libs/encodings.lua: Use mime.b64 for base64.encode
Matthew Wild <mwild1@gmail.com>
parents: 107
diff changeset
5 local mime = require "mime";
5de7f66e4168 libs/encodings.lua: Use mime.b64 for base64.encode
Matthew Wild <mwild1@gmail.com>
parents: 107
diff changeset
6
0
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 module "encodings"
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 stringprep = {};
130
5de7f66e4168 libs/encodings.lua: Use mime.b64 for base64.encode
Matthew Wild <mwild1@gmail.com>
parents: 107
diff changeset
10 base64 = { encode = mime.b64, decode = not_impl }; --mime.unb64 is buggy with \0
0
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11
caf260adc453 Beginning of new verse
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 return _M;

mercurial