Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(74)

Unified Diff: src/pkg/http/cgi/host.go

Issue 4248075: code review 4248075: http: move RemoteAddr & UsingTLS from ResponseWriter to... (Closed)
Patch Set: diff -r ca4f5cc00121 https://go.googlecode.com/hg/ Created 14 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/godoc/main.go ('k') | src/pkg/http/cgi/host_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/http/cgi/host.go
===================================================================
--- a/src/pkg/http/cgi/host.go
+++ b/src/pkg/http/cgi/host.go
@@ -74,11 +74,15 @@
"PATH_INFO=" + pathInfo,
"SCRIPT_NAME=" + root,
"SCRIPT_FILENAME=" + h.Path,
- "REMOTE_ADDR=" + rw.RemoteAddr(),
- "REMOTE_HOST=" + rw.RemoteAddr(),
+ "REMOTE_ADDR=" + req.RemoteAddr,
+ "REMOTE_HOST=" + req.RemoteAddr,
"SERVER_PORT=" + port,
}
+ if req.TLS != nil {
+ env = append(env, "HTTPS=on")
+ }
+
if len(req.Cookie) > 0 {
b := new(bytes.Buffer)
for idx, c := range req.Cookie {
« no previous file with comments | « src/cmd/godoc/main.go ('k') | src/pkg/http/cgi/host_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b