Comparison

plugins/mod_c2s.lua @ 11359:db146bf7b120

mod_c2s: Reflect stream 'from' attribute back if set (fix #1625) Clients should *not* be setting this before TLS anyways.
author Kim Alvefur <zash@zash.se>
date Wed, 03 Feb 2021 21:41:45 +0100
parent 11120:b2331f3dfeea
child 11477:c90ef8745779
comparison
equal deleted inserted replaced
11358:ebbf8dca33d2 11359:db146bf7b120
88 -- We don't serve this host... 88 -- We don't serve this host...
89 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; 89 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)};
90 return; 90 return;
91 end 91 end
92 92
93 session:open_stream(); 93 session:open_stream(host, attr.from);
94 94
95 (session.log or log)("debug", "Sent reply <stream:stream> to client"); 95 (session.log or log)("debug", "Sent reply <stream:stream> to client");
96 session.notopen = nil; 96 session.notopen = nil;
97 97
98 -- If session.secure is *false* (not nil) then it means we /were/ encrypting 98 -- If session.secure is *false* (not nil) then it means we /were/ encrypting