cgi

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: Unlicense Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeminiCGIDirectory

func GeminiCGIDirectory(fsroot, urlroot, cmd string) sliderule.Handler

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 NexCGIDirectory(fsroot, urlroot, cmd string) sliderule.Handler

func ResolveCGI

func ResolveCGI(requestpath, fsroot string) (string, string, error)

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

func SpartanCGIDirectory(fsroot, urlroot, cmd string) sliderule.Handler

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL