add RemoteAddr and URL on Request

master
fangdingjun 6 years ago
parent a1577f80df
commit 60510df289

@ -317,6 +317,10 @@ func (c *Conn) serve(s *stream) {
if handler == nil {
handler = http.DefaultServeMux
}
s.request.RemoteAddr = c.conn.RemoteAddr().String()
if s.request.URL == nil {
s.request.URL = &url.URL{}
}
handler.ServeHTTP(s, s.request)
s.Close()
}

Loading…
Cancel
Save