summaryrefslogtreecommitdiff
path: root/finger
diff options
context:
space:
mode:
Diffstat (limited to 'finger')
-rw-r--r--finger/client.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/finger/client.go b/finger/client.go
index 75a382f..bd1e3bf 100644
--- a/finger/client.go
+++ b/finger/client.go
@@ -37,7 +37,12 @@ func (c Client) RoundTrip(request *types.Request) (*types.Response, error) {
request.RemoteAddr = conn.RemoteAddr()
request.TLSState = nil
- if _, err := conn.Write([]byte(strings.TrimPrefix(request.Path, "/") + "\r\n")); err != nil {
+ username := request.User.String()
+ if username == "" {
+ username = strings.TrimPrefix(request.Path, "/")
+ }
+
+ if _, err := conn.Write([]byte(username + "\r\n")); err != nil {
return nil, err
}
@@ -57,3 +62,5 @@ func (c Client) Fetch(query string) (*types.Response, error) {
}
return c.RoundTrip(req)
}
+
+func (c Client) IsRedirect(_ *types.Response) bool { return false }