summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-13 12:45:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-13 12:45:23 +0000
commit75e61b708df013a632d2fa2788e1df196e5b08f6 (patch)
tree4a5e2f4c2eb08c21b74f7c2ba9ec42186ded7c40
parentaabf34b70e1e4378769faad6048e6c236cf7368f (diff)
downloadmandoc-75e61b708df013a632d2fa2788e1df196e5b08f6.tar.gz
make source vs. formatted guessing a bit more robust
-rw-r--r--cgi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgi.c b/cgi.c
index a95ab464..383d0553 100644
--- a/cgi.c
+++ b/cgi.c
@@ -768,6 +768,8 @@ format(const struct req *req, const char *file)
static void
resp_show(const struct req *req, const char *file)
{
+ if ('.' == file[0] || '/' == file[1])
+ file += 2;
if ('c' == *file)
catman(req, file);