aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs.go b/fs.go
index c4fba24..7a73150 100644
--- a/fs.go
+++ b/fs.go
@@ -67,7 +67,7 @@ func (fsys fileServer) ServeGemini(ctx context.Context, w ResponseWriter, r *Req
if target != "/" {
target += "/"
}
- if r.URL.Path != target {
+ if len(r.URL.Path) != len(target) || r.URL.Path != target {
w.WriteHeader(StatusPermanentRedirect, target)
return
}