summaryrefslogtreecommitdiff
path: root/gemini.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-10-30 13:02:06 -0600
committertjpcc <tjp@ctrl-c.club>2023-10-30 13:02:37 -0600
commit0b57acaa2d31038f858c7ad6722db43409c1b0a1 (patch)
treebb421b984cbfc01a540da6e20251f1d642db829d /gemini.go
parentdeb9bd75511c790d151449b020093f54515bb19f (diff)
Add support for spartan protocolspartan
spartan server definitions are very similar to gemini. The major changes are: * no "servertls" directives * no "autoatom" modifier (to be fixed) * no "git" directives (to be fixed) Fixes #15
Diffstat (limited to 'gemini.go')
-rw-r--r--gemini.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/gemini.go b/gemini.go
index f48f3ac..e2896dc 100644
--- a/gemini.go
+++ b/gemini.go
@@ -133,11 +133,7 @@ func addGeminiStaticRoute(router *sr.Router, route RouteDirective) {
handlers = append(handlers, fs.GeminiDirectoryListing(route.FsPath, route.URLPath, nil))
}
- var handler sr.Handler
- if len(handlers) == 1 {
- handler = handlers[0]
- }
- handler = sr.FallthroughHandler(handlers...)
+ handler := sr.FallthroughHandler(handlers...)
if route.Modifiers.AutoAtom {
handler = atomconv.Auto(handler)