From 2365233a56a835ce38899524a9a50acdf53d8ff7 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 12 Jul 2009 19:16:13 +0100 Subject: net.httpserver: Mark a request as secure if it is made using HTTPS --- net/httpserver_listener.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net') 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 -- cgit v1.2.3