From 0b57acaa2d31038f858c7ad6722db43409c1b0a1 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 30 Oct 2023 13:02:06 -0600 Subject: Add support for spartan protocol 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 --- gemini.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gemini.go') 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) -- cgit v1.2.3