fcgi

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fcgi implements the FastCGI protocol. Currently only the responder role is supported. The protocol is defined at http://www.fastcgi.com/drupal/node/6?q=node/22

Index

Constants

This section is empty.

Variables

View Source
var ErrConnClosed = errors.New("fcgi: connection to web server closed")

ErrConnClosed 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.

View Source
var ErrRequestAborted = errors.New("fcgi: request aborted by web server")

ErrRequestAborted is returned by Read when a handler attempts to read the body of a request that has been aborted by the web server.

Functions

func Serve

func Serve(l net.Listener, handler http.Handler) error

Serve 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.

Types

type Request

type Request struct {
	// contains filtered or unexported fields
}

Request holds the state for an in-progress request. As soon as it's complete, it's converted to an http.Request.

type ResponseWriter

type ResponseWriter interface {
	Header() http.Header
	Write([]byte) (int, error)
	WriteHeader(int)
	WriteErr([]byte) (int, error)
}

A ResponseWriter interface is used by an HTTP handler to construct an HTTP response.

A ResponseWriter may not be used after the Handler.ServeHTTP method has returned.

Jump to

Keyboard shortcuts

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