* mdocml: If PATH_INFO contains a complete and correct path to a manual
@ 2016-04-15 0:38 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2016-04-15 0:38 UTC (permalink / raw)
To: source
Log Message:
-----------
If PATH_INFO contains a complete and correct path to a manual page
file, for example "/OpenBSD-5.9/man2/pledge.2", no database query
is needed and the file is delivered directly.
But even in this case, let's parse the PATH_INFO and fill the query
structure such that the search form at the top of the result page
gets pre-filled with useful values.
Modified Files:
--------------
mdocml:
cgi.c
Revision Data
-------------
Index: cgi.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/cgi.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -Lcgi.c -Lcgi.c -u -p -r1.123 -r1.124
--- cgi.c
+++ cgi.c
@@ -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);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-15 0:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-15 0:38 mdocml: If PATH_INFO contains a complete and correct path to a manual schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).