cgi

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Unlicense Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeminiCGIDirectory

func GeminiCGIDirectory(pathRoot, fsRoot string) sr.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(pathRoot, fsRoot string) 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 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,
) (io.Reader, int, error)

RunCGI runs a specific program as a CGI script.

func SpartanCGIDirectory

func SpartanCGIDirectory(pathRoot, fsRoot string) sr.Handler

SpartanCGIDirectory runs executable files relative to a root directory in the file system.

It will also find any run any executable _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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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