From c9f58a83c7e2eb40b8d88e0b0e8c1d273cdf5123 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Sun, 22 Aug 2010 14:38:26 +0000 Subject: [PATCH] Log HTTPS status. --- NEWS | 2 ++ ykval-verify.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 64b9472..3cafabe 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ * Timestamp request and response because syslog doesn't record year nor sub-second resolution. + * Log whether HTTPS is used or not. + * Version 2.6 released 2010-08-02 * Don't use rowCount in ykval-revoke, there seems to be some problem diff --git a/ykval-verify.php b/ykval-verify.php index 81b8b5b..8564bcb 100644 --- a/ykval-verify.php +++ b/ykval-verify.php @@ -10,7 +10,8 @@ header("content-type: text/plain"); $myLog = new Log('ykval-verify'); $myLog->addField('ip', $_SERVER['REMOTE_ADDR']); $myLog->log(LOG_INFO, "Request: " . $_SERVER['QUERY_STRING'] . - " (at " . date("c") . " " . microtime() . ")"); + " (at " . date("c") . " " . microtime() . ") " . + ($_SERVER["HTTPS"] == "on" ? "HTTPS" : "HTTP")); /* Detect protocol version */ if (preg_match("/\/wsapi\/([0-9]+)\.([0-9]+)\//", $_SERVER['REQUEST_URI'], $out)) {