From 4f6f3dcd4b8c71f5caa52864092dbde22665a645 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 30 Jan 2023 11:34:13 -0700 Subject: finger protocol --- gopher/request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gopher') 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 } -- cgit v1.2.3