diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-09-14 09:40:31 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-09-14 09:40:31 -0600 |
commit | a768f589b9ce146ae227115713966d439750e9d5 (patch) | |
tree | 1feac6357499d0a23036bf250fb0a2fbb57dd878 /contrib/cgi | |
parent | 6d73747c25ce518db5742d0c2d465f3e5f9881a1 (diff) |
add REMOTE_PORT to CGI env
Diffstat (limited to 'contrib/cgi')
-rw-r--r-- | contrib/cgi/cgi.go | 4 |
1 files changed, 2 insertions, 2 deletions
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, |