From b3c4786482eb7d12b39d63c97a6dd331950eb808 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 26 Feb 2015 15:47:37 -0700 Subject: [PATCH] Also work with stunnel --- eris.c | 6 ++++++ test.sh | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/eris.c b/eris.c index 909b174..2dc36af 100644 --- a/eris.c +++ b/eris.c @@ -212,6 +212,12 @@ get_ucspi_env() char *ip = proto_getenv(ucspi, "REMOTEIP"); char *port = proto_getenv(ucspi, "REMOTEPORT"); + if (! ip) { + // stunnel + ip = getenv("REMOTE_HOST"); + port = getenv("REMOTE_PORT"); + } + if (ip) { char buf[80]; diff --git a/test.sh b/test.sh index 790d285..4b04d6a 100755 --- a/test.sh +++ b/test.sh @@ -4,6 +4,10 @@ : ${HTTPD_CGI:=./eris -c} : ${HTTPD_IDX:=./eris -d} +tests=0 +successes=0 +failures=0 + H () { section="$*" printf "\n%-20s " "$*"