Skip to content

Commit 6d40a5d

Browse files
committed
Merge branch 'master' of https://git.mills.io/prologic/go-gopher
2 parents 4012712 + e9a45fb commit 6d40a5d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

gopher.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,10 @@ func (i *Item) FetchDirectory() (Directory, error) {
437437
// LocalHost and LocalPort may be used by the Handler for local links.
438438
// These are specified in the call to ListenAndServe.
439439
type Request struct {
440-
Selector string
441-
LocalHost string
442-
LocalPort int
440+
Selector string
441+
LocalHost string
442+
LocalPort int
443+
RemoteAddr string
443444
}
444445

445446
// A Handler responds to a Gopher request.
@@ -700,6 +701,8 @@ func (c *conn) serve(ctx context.Context) {
700701
return
701702
}
702703

704+
w.req.RemoteAddr = c.remoteAddr
705+
703706
serverHandler{c.server}.ServeGopher(w, w.req)
704707
w.End()
705708
}

0 commit comments

Comments
 (0)