gemini.git

going-flying.com gemini git repository

summary

tree

log

refs

2a44fbf686c108c92e77b27d94e4e53f958976c8 - Matthew Ernisse - 1612642787

--debug

view tree

view raw

diff --git a/git/gateway.py b/git/gateway.py
index 138f3f4..efa6fe7 100644
--- a/git/gateway.py
+++ b/git/gateway.py
@@ -24,6 +24,8 @@ def handle_cgi_request(path: str, query: str):
     # /git/cgi/ -> PATH_INFO: ""
     # /git/cgi/gemini.git/ -> PATH_INFO: "gemini.git"
     path_trace = path.split("/")
+    if path_trace[-1] == "": path_trace.pop()
+
     if not path_trace or (len(path_trace) == 1 and not path_trace[0]):
         print(f"{STATUS_SUCCESS} {META_GEMINI}\r\n")  # welcome page
         print(f"# Welcome to {GIT_GMI_SITE_TITLE}")
diff --git a/git/git.py b/git/git.py
index 183c9b6..be189c4 100644
--- a/git/git.py
+++ b/git/git.py
@@ -158,8 +158,6 @@ class GitGmiRepo:
         # recursively replace all Trees with a list of Blobs inside it,
         # bundled with the Tree's name as a tuple,
         # e.g. [('src', [blob0, blob1]), otherblob].
-        tree_list = list(tree)
-        print(tree_list)
         for idx, item in enumerate(tree_list):
             if isinstance(item, Tree):
                 tree_list[idx] = (item.name, cls.parse_recursive_tree(tree_list[idx]))