From a768f589b9ce146ae227115713966d439750e9d5 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Thu, 14 Sep 2023 09:40:31 -0600 Subject: add REMOTE_PORT to CGI env --- contrib/cgi/cgi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/cgi') diff --git a/contrib/cgi/cgi.go b/contrib/cgi/cgi.go index de0d35f..48af04a 100644 --- a/contrib/cgi/cgi.go +++ b/contrib/cgi/cgi.go @@ -147,8 +147,8 @@ func prepareCGIEnv( "QUERY_STRING=" + request.RawQuery, } - host, _, _ := net.SplitHostPort(request.RemoteAddr.String()) - environ = append(environ, "REMOTE_ADDR="+host) + host, port, _ := net.SplitHostPort(request.RemoteAddr.String()) + environ = append(environ, "REMOTE_ADDR="+host, "REMOTE_PORT="+port) environ = append( environ, -- cgit v1.2.3