{"modulePath":"github.com/mutablelogic/go-server","version":"v1.4.12","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package fcgi\n\nPackage fcgi implements the FastCGI protocol.\n\nSee [https://fast-cgi.github.io/](https://fast-cgi.github.io/) for an unofficial mirror of the original documentation.\n\nCurrently only the responder role is supported.\n\n## Variables\n\n```go\nvar ErrConnClosed = errors.New(\"fcgi: connection to web server closed\")\n```\nErrConnClosed is returned by Read when a handler attempts to read the body of a request after the connection to the web server has been closed.\n\n```go\nvar ErrRequestAborted = errors.New(\"fcgi: request aborted by web server\")\n```\nErrRequestAborted is returned by Read when a handler attempts to read the body of a request that has been aborted by the web server.\n\n## Functions\n\n```go\nfunc ProcessEnv(r *http.Request) map[string]string\n```\nProcessEnv returns FastCGI environment variables associated with the request r for which no effort was made to be included in the request itself - the data is hidden in the request's context. As an example, if REMOTE\\_USER is set for a request, it will not be found anywhere in r, but it will be included in ProcessEnv's response (via r's context).\n\n```go\nfunc Serve(l net.Listener, handler http.Handler) error\n```\nServe accepts incoming FastCGI connections on the listener l, creating a new goroutine for each. The goroutine reads requests and then calls handler to reply to them. If l is nil, Serve accepts connections from os.Stdin. If handler is nil, http.DefaultServeMux is used.\n\n## Types\n\n```go\ntype Server struct {\n\t// Network and Addr is the address or path to the socket, which\n\t// are used to create the listener\n\tNetwork, Addr string\n\n\t// handler to invoke, http.DefaultServeMux if nil\n\tHandler http.Handler\n\n\t// Owner, Group and Mode are used to set the permissions on the socket\n\t// or -1 if no owner or group should be set\n\tOwner, Group int\n\n\t// File mode for the socket or 0 if no work should be done\n\tDirMode os.FileMode\n\tMode    os.FileMode\n\t// contains filtered or unexported fields\n}\n```\nA Server defines parameters for running an FCGI server. The zero value for Server is a valid configuration, which responds to requests over stdin\n\n```go\nfunc (s *Server) Close() error\n```\n\n```go\nfunc (s *Server) ListenAndServe() error\n```\n\n","path":"github.com/mutablelogic/go-server/pkg/httpserver/fcgi","name":"fcgi","synopsis":"Package fcgi implements the FastCGI protocol.","isRedistributable":true}
