Changeset

1542:e5d5f864c125

Merge with 0.5
author Matthew Wild <mwild1@gmail.com>
date Sun, 12 Jul 2009 19:17:14 +0100
parents 1539:30ebb38573b7 (current diff) 1541:591732da1306 (diff)
children 1545:e6bd29342f65
files
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/httpserver_listener.lua	Sun Jul 12 15:23:39 2009 +0100
+++ b/net/httpserver_listener.lua	Sun Jul 12 19:17:14 2009 +0100
@@ -22,6 +22,11 @@
 	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
--- a/plugins/mod_bosh.lua	Sun Jul 12 15:23:39 2009 +0100
+++ b/plugins/mod_bosh.lua	Sun Jul 12 19:17:14 2009 +0100
@@ -147,7 +147,7 @@
 		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);