summaryrefslogtreecommitdiffstats
path: root/cgi/cgiextrapath.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/cgiextrapath.c')
-rw-r--r--cgi/cgiextrapath.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/cgi/cgiextrapath.c b/cgi/cgiextrapath.c
new file mode 100644
index 0000000..3cd3aa6
--- /dev/null
+++ b/cgi/cgiextrapath.c
@@ -0,0 +1,21 @@
+/*
+** Copyright 2007 Double Precision, Inc.
+** See COPYING for distribution information.
+*/
+
+/*
+*/
+#include "cgi.h"
+#include <stdlib.h>
+#include <unistd.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+const char *cgiextrapath()
+{
+ const char *pi=getenv("PATH_INFO");
+
+ if (!pi) pi="";
+ return pi;
+}