equal
deleted
inserted
replaced
5 -- COPYING file in the source package for more information. |
5 -- COPYING file in the source package for more information. |
6 -- |
6 -- |
7 |
7 |
8 module:set_global(); |
8 module:set_global(); |
9 |
9 |
|
10 local add_task = require "util.timer".add_task; |
10 local add_filter = require "util.filters".add_filter; |
11 local add_filter = require "util.filters".add_filter; |
11 local sha1 = require "util.hashes".sha1; |
12 local sha1 = require "util.hashes".sha1; |
12 local base64 = require "util.encodings".base64.encode; |
13 local base64 = require "util.encodings".base64.encode; |
13 local st = require "util.stanza"; |
14 local st = require "util.stanza"; |
14 local parse_xml = require "util.xml".parse; |
15 local parse_xml = require "util.xml".parse; |
22 local build_close = websocket_frames.build_close; |
23 local build_close = websocket_frames.build_close; |
23 local parse_close = websocket_frames.parse_close; |
24 local parse_close = websocket_frames.parse_close; |
24 |
25 |
25 local t_concat = table.concat; |
26 local t_concat = table.concat; |
26 |
27 |
|
28 local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5); |
27 local consider_websocket_secure = module:get_option_boolean("consider_websocket_secure"); |
29 local consider_websocket_secure = module:get_option_boolean("consider_websocket_secure"); |
28 local cross_domain = module:get_option("cross_domain_websocket"); |
30 local cross_domain = module:get_option("cross_domain_websocket"); |
29 if cross_domain then |
31 if cross_domain then |
30 if cross_domain == true then |
32 if cross_domain == true then |
31 cross_domain = "*"; |
33 cross_domain = "*"; |