From c944a5703aecc36e044f3fcd17f6fed41a3e436d Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 5 Oct 2019 22:32:31 +0530 Subject: add helper function to detect http/https on an MHD connection --- src/include/taler_util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/include/taler_util.h') diff --git a/src/include/taler_util.h b/src/include/taler_util.h index 310c88955..9cfcb3dce 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -155,6 +155,19 @@ char * TALER_urlencode (const char *s); +/** + * Find out if an MHD connection is using HTTPS (either + * directly or via proxy). + * + * @param connection MHD connection + * @returns GNUNET_YES if the MHD connection is using https, + * GNUNET_NO if the MHD connection is using http, + * GNUNET_SYSERR if the connection type couldn't be determined + */ +int +TALER_mhd_is_https (struct MHD_Connection *connection); + + /** * Make an absolute URL with query parameters. * -- cgit v1.2.3