From 2e5ac8b9e1f2f705455d74750e465c2066ffdc7c Mon Sep 17 00:00:00 2001 From: tjp Date: Thu, 3 Apr 2025 09:51:32 -0600 Subject: empty path handling for spartan/gemini clients and servers --- gemini/client.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gemini/client.go') diff --git a/gemini/client.go b/gemini/client.go index 1e65a39..e0f70e4 100644 --- a/gemini/client.go +++ b/gemini/client.go @@ -97,6 +97,10 @@ func (client Client) RoundTrip(ctx context.Context, request *types.Request) (*ty } } + if destURL.Path == "" { + destURL.Path = "/" + } + if _, err := conn.Write([]byte(destURL.String() + "\r\n")); err != nil { return nil, err } -- cgit v1.2.3