summaryrefslogtreecommitdiff
path: root/contrib/cgi/spartan.go
blob: 32ea66c2d677545d1dd8f3dc64dadc527977d011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package cgi

import (
	"tildegit.org/tjp/sliderule"
	"tildegit.org/tjp/sliderule/spartan"
)

// SpartanCGIDirectory runs any executable files relative to a root directory on the file system.
//
// It will also find and run any executables _part way_ through the path, so for example
// a request for /foo/bar/baz can also run an executable found at /foo or  /foo/bar. In
// such a case the PATH_INFO environment variable will include the remaining portion of
// the URI path.
func SpartanCGIDirectory(fsroot, urlroot, cmd string) sliderule.Handler {
	return cgiDirectory(spartan.ServerProtocol, fsroot, urlroot, cmd)
}