summaryrefslogtreecommitdiff
path: root/gopher/request.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-30 11:34:13 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-30 11:36:48 -0700
commit4f6f3dcd4b8c71f5caa52864092dbde22665a645 (patch)
tree19ae4d9203774173b83c25a91d7787d88bd3aa6a /gopher/request.go
parent9cbc5cdd467ccd8e68f0f5d1d971ab76c2946624 (diff)
finger protocol
Diffstat (limited to 'gopher/request.go')
-rw-r--r--gopher/request.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/gopher/request.go b/gopher/request.go
index 6c708c0..ef68438 100644
--- a/gopher/request.go
+++ b/gopher/request.go
@@ -25,10 +25,10 @@ func ParseRequest(rdr io.Reader) (*gus.Request, error) {
return &gus.Request{
URL: &url.URL{
Scheme: "gopher",
- Path: path.Clean(strings.TrimRight(selector, "\r\n")),
+ Path: path.Clean(strings.TrimSuffix(selector, "\r\n")),
OmitHost: true, //nolint:typecheck
// (for some reason typecheck on drone-ci doesn't realize OmitHost is a field in url.URL)
- RawQuery: url.QueryEscape(strings.TrimRight(search, "\r\n")),
+ RawQuery: url.QueryEscape(strings.TrimSuffix(search, "\r\n")),
},
}, nil
}