From 69b0974cbb6ada27d5bbdf0930e3a225acbaf8fb Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 19 Apr 2020 16:27:43 +0200 Subject: Bugfix: Add missing CGI variables: HTTPS, HTTP_REFERER, HTTP_COOKIE --- response.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'response.cpp') diff --git a/response.cpp b/response.cpp index 52081f6..51c9603 100644 --- a/response.cpp +++ b/response.cpp @@ -123,6 +123,8 @@ std::unordered_map> Get return "HTTP/"s + std::to_string(major) + "."s + std::to_string(minor); }}, + {"https", [](RequestContext& req_ctx) { return req_ctx.GetSocket().protocol == SocketProtocol::HTTPS ? "on" : "off"; }}, + {"location", [](RequestContext& req_ctx) { return req_ctx.GetTarget(); }}, {"method", [](RequestContext& req_ctx) { return std::string{req_ctx.GetReq().method_string()};}}, -- cgit v1.2.3