]> Cypherpunks repositories - gostls13.git/commit
net/http/cgi: Correctly pass down the REMOTE_PORT value for CGI requests.
authorGeorge Shammas <george@shamm.as>
Thu, 18 Dec 2014 04:22:49 +0000 (23:22 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 23 Dec 2014 01:33:26 +0000 (01:33 +0000)
commit3ffc9756d1963e834fbce63ff969de8959216c2b
treea2a4a206c20cde0f0dd988193b0d12b7b8802172
parent209dd4cdc1e9180d819b1217f065a63b94e82ff9
net/http/cgi: Correctly pass down the REMOTE_PORT value for CGI requests.

Currently when we get a CGI or FCGI request, the remote port of the client
is hard coded to zero, despite nearly every webserver passing down the
REMOTE_PORT variable.

This was likely originally excluded because the CGI RFC (rfc3875) does not
mention anything about the remote port of the client. However every webserver
tested does pass REMOTE_PORT down. This includes Apache 2.2, Apache 2.4,
nginx and lighttpd.

Fixes #8351

Change-Id: I4c6366cb39f0ccc05e038bd31d85f93b76e8d0c8
Reviewed-on: https://go-review.googlesource.com/1750
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/cgi/child.go
src/net/http/cgi/child_test.go