=================================================================== RCS file: /cvs/mandoc/cgi.c,v retrieving revision 1.123 retrieving revision 1.124 diff -u -p -r1.123 -r1.124 --- mandoc/cgi.c 2016/04/15 00:14:17 1.123 +++ mandoc/cgi.c 2016/04/15 00:37:50 1.124 @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.123 2016/04/15 00:14:17 schwarze Exp $ */ +/* $Id: cgi.c,v 1.124 2016/04/15 00:37:50 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016 Ingo Schwarze @@ -1037,9 +1037,10 @@ main(void) else if (*path == '/') path++; - if (*path != '\0' && access(path, F_OK) == -1) { + if (*path != '\0') { path_parse(&req, path); - path = ""; + if (access(path, F_OK) == -1) + path = ""; } else if ((querystring = getenv("QUERY_STRING")) != NULL) http_parse(&req, querystring);