Comparison

plugins/mod_bosh.lua @ 11560:3bbb1af92514

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 13 May 2021 11:17:13 +0100
parent 11392:a76493b75dec
parent 11540:1937b3c3efb5
child 11727:f3aee8a825cc
comparison
equal deleted inserted replaced
11538:30feeb4d9d0b 11560:3bbb1af92514
43 -- (the client can set this to a lower value when it connects, if it chooses) 43 -- (the client can set this to a lower value when it connects, if it chooses)
44 local bosh_max_wait = module:get_option_number("bosh_max_wait", 120); 44 local bosh_max_wait = module:get_option_number("bosh_max_wait", 120);
45 45
46 local consider_bosh_secure = module:get_option_boolean("consider_bosh_secure"); 46 local consider_bosh_secure = module:get_option_boolean("consider_bosh_secure");
47 local cross_domain = module:get_option("cross_domain_bosh"); 47 local cross_domain = module:get_option("cross_domain_bosh");
48 local stanza_size_limit = module:get_option_number("c2s_stanza_size_limit", 1024*256);
48 49
49 if cross_domain ~= nil then 50 if cross_domain ~= nil then
50 module:log("info", "The 'cross_domain_bosh' option has been deprecated"); 51 module:log("info", "The 'cross_domain_bosh' option has been deprecated");
51 end 52 end
52 53
120 local request, response = event.request, event.response; 121 local request, response = event.request, event.response;
121 response.on_destroy = on_destroy_request; 122 response.on_destroy = on_destroy_request;
122 local body = request.body; 123 local body = request.body;
123 124
124 local context = { request = request, response = response, notopen = true }; 125 local context = { request = request, response = response, notopen = true };
125 local stream = new_xmpp_stream(context, stream_callbacks); 126 local stream = new_xmpp_stream(context, stream_callbacks, stanza_size_limit);
126 response.context = context; 127 response.context = context;
127 128
128 local headers = response.headers; 129 local headers = response.headers;
129 headers.content_type = "text/xml; charset=utf-8"; 130 headers.content_type = "text/xml; charset=utf-8";
130 131