aboutsummaryrefslogtreecommitdiff
path: root/request.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-20 16:27:33 -0500
committerAdnan Maolood <[email protected]>2021-02-20 16:27:35 -0500
commit2308c6407f52572c0d172279163725d481bb3373 (patch)
tree98e1b625606a21983319af30471bda94462b8c3e /request.go
parentMake Status a type (diff)
downloadgo-gemini-2308c6407f52572c0d172279163725d481bb3373.tar.xz
go-gemini-2308c6407f52572c0d172279163725d481bb3373.zip
server: Make Request.RemoteAddr a net.Addr
A concrete type is better.
Diffstat (limited to 'request.go')
-rw-r--r--request.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/request.go b/request.go
index b50176f..e75f040 100644
--- a/request.go
+++ b/request.go
@@ -4,6 +4,7 @@ import (
"bufio"
"crypto/tls"
"io"
+ "net"
"net/url"
)
@@ -32,12 +33,9 @@ type Request struct {
// RemoteAddr allows Gemini servers and other software to record
// the network address that sent the request, usually for
- // logging. This field is not filled in by ReadRequest and
- // has no defined format. The Gemini server in this package
- // sets RemoteAddr to an "IP:port" address before invoking a
- // handler.
+ // logging. This field is not filled in by ReadRequest.
// This field is ignored by the Gemini client.
- RemoteAddr string
+ RemoteAddr net.Addr
// TLS allows Gemini servers and other software to record
// information about the TLS connection on which the request