# HG changeset patch # User Kim Alvefur # Date 1533874375 -7200 # Node ID b7aa8630438e1c785e727b23983b571d8919d540 # Parent 9a89ec5030b50fe99ad0ad1e0fb2f8bbd7517d23 mod_auth_http_cookie: Also try to get HTTP request from WebSocket session This property was added in Prosody 0.10.1 diff -r 9a89ec5030b5 -r b7aa8630438e mod_auth_http_cookie/mod_auth_http_cookie.lua --- 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;