Comparison

plugins/mod_bosh.lua @ 5188:6689605f8591

mod_bosh: Add 'Connection: keep-alive' header
author Matthew Wild <mwild1@gmail.com>
date Thu, 22 Nov 2012 19:37:30 +0000
parent 5187:d71f731e8fe4
child 5634:7298c9bbb30f
child 5639:7a0e19e649b7
comparison
equal deleted inserted replaced
5187:d71f731e8fe4 5188:6689605f8591
34 local BOSH_DEFAULT_REQUESTS = module:get_option_number("bosh_max_requests", 2); 34 local BOSH_DEFAULT_REQUESTS = module:get_option_number("bosh_max_requests", 2);
35 local bosh_max_wait = module:get_option_number("bosh_max_wait", 120); 35 local bosh_max_wait = module:get_option_number("bosh_max_wait", 120);
36 36
37 local consider_bosh_secure = module:get_option_boolean("consider_bosh_secure"); 37 local consider_bosh_secure = module:get_option_boolean("consider_bosh_secure");
38 38
39 local default_headers = { ["Content-Type"] = "text/xml; charset=utf-8" }; 39 local default_headers = { ["Content-Type"] = "text/xml; charset=utf-8", ["Connection"] = "keep-alive" };
40 40
41 local cross_domain = module:get_option("cross_domain_bosh", false); 41 local cross_domain = module:get_option("cross_domain_bosh", false);
42 if cross_domain then 42 if cross_domain then
43 default_headers["Access-Control-Allow-Methods"] = "GET, POST, OPTIONS"; 43 default_headers["Access-Control-Allow-Methods"] = "GET, POST, OPTIONS";
44 default_headers["Access-Control-Allow-Headers"] = "Content-Type"; 44 default_headers["Access-Control-Allow-Headers"] = "Content-Type";