Changeset

3224:b7aa8630438e

mod_auth_http_cookie: Also try to get HTTP request from WebSocket session This property was added in Prosody 0.10.1
author Kim Alvefur <zash@zash.se>
date Fri, 10 Aug 2018 06:12:55 +0200
parents 3223:9a89ec5030b5
children 3225:517c7f0333e3
files mod_auth_http_cookie/mod_auth_http_cookie.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_http_cookie/mod_auth_http_cookie.lua	Fri Aug 10 06:10:38 2018 +0200
+++ b/mod_auth_http_cookie/mod_auth_http_cookie.lua	Fri Aug 10 06:12:55 2018 +0200
@@ -142,7 +142,9 @@
 end
 
 local function get_session_cookies(session)
-	local request = session.requests[1];
+	local request = session.websocket_request; -- WebSockets
+	if not request and session.requests then -- BOSH
+		request = session.requests[1];
 	end
 	if not request and session.conn._http_open_response then -- Fallback BOSH
 		local response = session.conn._http_open_response;