Documentation ¶
Index ¶
- func GeminiCGIDirectory(fsroot, urlroot, cmd string) sliderule.Handler
- func GopherCGIDirectory(fsroot, urlroot, cmd string, settings *gophermap.FileSystemSettings) sr.Handler
- func NexCGIDirectory(fsroot, urlroot, cmd string) sliderule.Handler
- func ResolveCGI(requestpath, fsroot string) (string, string, error)
- func RunCGI(ctx context.Context, request *sr.Request, executable string, pathInfo string, ...) (*bytes.Buffer, int, error)
- func SpartanCGIDirectory(fsroot, urlroot, cmd string) sliderule.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeminiCGIDirectory ¶
GeminiCGIDirectory 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 GopherCGIDirectory ¶
func GopherCGIDirectory(fsroot, urlroot, cmd string, settings *gophermap.FileSystemSettings) sr.Handler
GopherCGIDirectory 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 NexCGIDirectory ¶ added in v1.6.0
func ResolveCGI ¶
ResolveCGI finds a CGI program corresponding to a request path.
It returns the path to the executable file and the PATH_INFO that should be passed, or an error.
It will find executables which are just part way through the path, so for example a request for /foo/bar/baz can run an executable found at /foo or /foo/bar. In such a case the PATH_INFO would include the remaining portion of the URI path.
func RunCGI ¶
func RunCGI( ctx context.Context, request *sr.Request, executable string, pathInfo string, workdir string, stderr io.Writer, ) (*bytes.Buffer, int, error)
RunCGI runs a specific program as a CGI script.
func SpartanCGIDirectory ¶
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.
Types ¶
This section is empty.