good morning!!!!

Skip to content
Snippets Groups Projects
Commit b50f453b authored by a's avatar a
Browse files

fix npi

parent 019a4542
No related branches found
Tags v0.0.38
No related merge requests found
......@@ -269,9 +269,6 @@ func newHTTPServerConn(r *http.Request, w http.ResponseWriter) ServerCodec {
Headers: c.r.Header,
},
}
if c.w != nil {
connInfo.HTTP.WriteHeaders = c.w.Header()
}
connInfo.HTTP.Origin = c.r.Header.Get("X-Real-Ip")
if connInfo.HTTP.Origin == "" {
connInfo.HTTP.Origin = c.r.Header.Get("X-Forwarded-For")
......@@ -287,6 +284,9 @@ func newHTTPServerConn(r *http.Request, w http.ResponseWriter) ServerCodec {
}
func (c *httpServerConn) peerInfo() PeerInfo {
if c.w != nil {
c.pi.HTTP.WriteHeaders = c.w.Header()
}
return c.pi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment