fix textviewer with g permission; closes #927

textfiles can also be viewed with `foo.txt?v` for less jank
This commit is contained in:
ed 2025-10-17 00:12:21 +00:00
parent b4fda5f1d6
commit dbb78705f7

View file

@ -6567,6 +6567,9 @@ class HttpCli(object):
elif is_dir and not self.can_read: elif is_dir and not self.can_read:
if use_dirkey: if use_dirkey:
is_dk = True is_dk = True
elif self.can_get and "doc" in self.uparam:
zs = vjoin(self.vpath, self.uparam["doc"]) + "?v"
return self.redirect(zs, flavor="redirecting to", use302=True)
elif not self.can_write: elif not self.can_write:
return self.tx_404(True) return self.tx_404(True)