Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 1541:591732da1306
mod_bosh: Mark a session as secure if it is created with HTTPS
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 12 Jul 2009 19:16:37 +0100 |
parent | 1537:6670af04aeb6 |
child | 1551:c6646e806d18 |
comparison
equal
deleted
inserted
replaced
1540:19fb86c19a59 | 1541:591732da1306 |
---|---|
145 -- New session | 145 -- New session |
146 sid = new_uuid(); | 146 sid = new_uuid(); |
147 local session = { type = "c2s_unauthed", conn = {}, sid = sid, rid = attr.rid, host = attr.to, bosh_version = attr.ver, bosh_wait = attr.wait, streamid = sid, | 147 local session = { type = "c2s_unauthed", conn = {}, sid = sid, rid = attr.rid, host = attr.to, bosh_version = attr.ver, bosh_wait = attr.wait, streamid = sid, |
148 bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY, | 148 bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY, |
149 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, close = bosh_close_stream, | 149 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, close = bosh_close_stream, |
150 dispatch_stanza = core_process_stanza, log = logger.init("bosh"..sid) }; | 150 dispatch_stanza = core_process_stanza, log = logger.init("bosh"..sid), secure = request.secure }; |
151 sessions[sid] = session; | 151 sessions[sid] = session; |
152 | 152 |
153 log("info", "New BOSH session, assigned it sid '%s'", sid); | 153 log("info", "New BOSH session, assigned it sid '%s'", sid); |
154 local r, send_buffer = session.requests, session.send_buffer; | 154 local r, send_buffer = session.requests, session.send_buffer; |
155 local response = { headers = default_headers } | 155 local response = { headers = default_headers } |