Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 2486:f0335b7284b1
mod_bosh: I == fail.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Jan 2010 03:36:03 +0000 |
parent | 2485:ace62f19076d |
child | 2608:68c43aaf681f |
comparison
equal
deleted
inserted
replaced
2485:ace62f19076d | 2486:f0335b7284b1 |
---|---|
29 local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60; | 29 local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60; |
30 local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5; | 30 local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5; |
31 local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2; | 31 local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2; |
32 local BOSH_DEFAULT_MAXPAUSE = tonumber(module:get_option("bosh_max_pause")) or 300; | 32 local BOSH_DEFAULT_MAXPAUSE = tonumber(module:get_option("bosh_max_pause")) or 300; |
33 | 33 |
34 local default_headers = { ["Content-Type"] = "text/xml; charset=utf-8" }; | |
34 local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }), attr = {} }; | 35 local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }), attr = {} }; |
35 | |
36 local default_headers = { ["Content-Type"] = "text/xml; charset=utf-8" }; | |
37 | 36 |
38 local cross_domain = module:get_option("cross_domain_bosh"); | 37 local cross_domain = module:get_option("cross_domain_bosh"); |
39 if cross_domain then | 38 if cross_domain then |
40 default_headers["Access-Control-Allow-Methods"] = "GET, POST, OPTIONS"; | 39 default_headers["Access-Control-Allow-Methods"] = "GET, POST, OPTIONS"; |
41 default_headers["Access-Control-Allow-Headers"] = "Content-Type"; | 40 default_headers["Access-Control-Allow-Headers"] = "Content-Type"; |