summaryrefslogtreecommitdiff
path: root/src/include/taler_util.h
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-10-05 22:32:31 +0530
committerFlorian Dold <florian.dold@gmail.com>2019-10-05 22:32:31 +0530
commitc944a5703aecc36e044f3fcd17f6fed41a3e436d (patch)
treeffd3d6475b553127e0795cd4f2d2eb27ee6e01b2 /src/include/taler_util.h
parent4ac5a15a0354b8ad5d24fcede186a7d608b2b157 (diff)
downloadexchange-c944a5703aecc36e044f3fcd17f6fed41a3e436d.tar.gz
exchange-c944a5703aecc36e044f3fcd17f6fed41a3e436d.tar.bz2
exchange-c944a5703aecc36e044f3fcd17f6fed41a3e436d.zip
add helper function to detect http/https on an MHD connection
Diffstat (limited to 'src/include/taler_util.h')
-rw-r--r--src/include/taler_util.h13
1 files changed, 13 insertions, 0 deletions
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
@@ -156,6 +156,19 @@ 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.
*
* @param base_url absolute base URL to use