mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
http: move RemoteAddr & UsingTLS from ResponseWriter to Request
ResponseWriter.RemoteAddr() string -> Request.RemoteAddr string ResponseWriter.UsingTLS() bool -> Request.TLS *tls.ConnectionState R=rsc, bradfitzwork CC=gburd, golang-dev https://golang.org/cl/4248075
This commit is contained in:
parent
ee23ab16da
commit
aae7b695ac
9 changed files with 68 additions and 45 deletions
|
|
@ -514,7 +514,7 @@ func (server *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
conn, _, err := w.(http.Hijacker).Hijack()
|
||||
if err != nil {
|
||||
log.Print("rpc hijacking ", w.RemoteAddr(), ": ", err.String())
|
||||
log.Print("rpc hijacking ", req.RemoteAddr, ": ", err.String())
|
||||
return
|
||||
}
|
||||
io.WriteString(conn, "HTTP/1.0 "+connected+"\n\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue