diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-07-12 19:17:14 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-07-12 19:17:14 +0100 |
commit | d9d11e5d9ca5c7ae51e4a2d5960a5adaac37f228 (patch) | |
tree | 469e767006c3e3b73dde626bd5c95105b611a875 | |
parent | c4841e0e92a8cce97c5fc3e689808aa4d63dc35a (diff) | |
parent | f0ac98b7892e16b50e7f6bbb66b128cf55266c0b (diff) | |
download | prosody-d9d11e5d9ca5c7ae51e4a2d5960a5adaac37f228.tar.gz prosody-d9d11e5d9ca5c7ae51e4a2d5960a5adaac37f228.zip |
Merge with 0.5
-rw-r--r-- | net/httpserver_listener.lua | 5 | ||||
-rw-r--r-- | plugins/mod_bosh.lua | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/net/httpserver_listener.lua b/net/httpserver_listener.lua index 48ade157..455191fb 100644 --- a/net/httpserver_listener.lua +++ b/net/httpserver_listener.lua @@ -22,6 +22,11 @@ function httpserver.listener(conn, data) if not request then request = new_request(conn); requests[conn] = request; + + -- If using HTTPS, request is secure + if conn.ssl() then + request.secure = true; + end end if data then diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index ccf08ec4..fdda206b 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -147,7 +147,7 @@ function stream_callbacks.streamopened(request, attr) local session = { type = "c2s_unauthed", conn = {}, sid = sid, rid = attr.rid, host = attr.to, bosh_version = attr.ver, bosh_wait = attr.wait, streamid = sid, bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY, requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, close = bosh_close_stream, - dispatch_stanza = core_process_stanza, log = logger.init("bosh"..sid) }; + dispatch_stanza = core_process_stanza, log = logger.init("bosh"..sid), secure = request.secure }; sessions[sid] = session; log("info", "New BOSH session, assigned it sid '%s'", sid); |