6 -- COPYING file in the source package for more information. |
6 -- COPYING file in the source package for more information. |
7 -- |
7 -- |
8 |
8 |
9 local st = require "util.stanza" |
9 local st = require "util.stanza" |
10 local b64 = require("mime").b64 |
10 local b64 = require("mime").b64 |
11 -- NOTE: The b64 routine in LuaSocket 2.0.2 and below |
|
12 -- contains a bug regarding handling \0, it's advisable |
|
13 -- that you use another base64 routine, or a patched |
|
14 -- version of LuaSocket. |
|
15 -- You can borrow Prosody's (binary) util.encodings lib: |
|
16 --local b64 = require("util.encodings").base64.encode |
|
17 |
|
18 local sha1 = require("util.sha1").sha1 |
11 local sha1 = require("util.sha1").sha1 |
19 |
12 |
20 local xmlns_disco = "http://jabber.org/protocol/disco"; |
13 local xmlns_disco = "http://jabber.org/protocol/disco"; |
21 local xmlns_disco_info = xmlns_disco.."#info"; |
14 local xmlns_disco_info = xmlns_disco.."#info"; |
22 local xmlns_disco_items = xmlns_disco.."#items"; |
15 local xmlns_disco_items = xmlns_disco.."#items"; |