blob: 521fefbb9c5b203335dc03425122684cb64ea374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<h1> Package fcgi </h1> <ul id="short-nav">
<li><code>import "net/http/fcgi"</code></li>
<li><a href="#pkg-overview" class="overviewLink">Overview</a></li>
<li><a href="#pkg-index" class="indexLink">Index</a></li>
</ul> <h2 id="pkg-overview">Overview </h2> <p>Package fcgi implements the FastCGI protocol. </p>
<p>See <a href="https://fast-cgi.github.io/">https://fast-cgi.github.io/</a> for an unofficial mirror of the original documentation. </p>
<p>Currently only the responder role is supported. </p> <h2 id="pkg-index">Index </h2> <ul id="manual-nav">
<li><a href="#pkg-variables">Variables</a></li>
<li><a href="#ProcessEnv">func ProcessEnv(r *http.Request) map[string]string</a></li>
<li><a href="#Serve">func Serve(l net.Listener, handler http.Handler) error</a></li>
</ul> <h3>Package files</h3> <p> <span>child.go</span> <span>fcgi.go</span> </p> <h2 id="pkg-variables">Variables</h2> <p>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. </p>
<pre data-language="go">var ErrConnClosed = errors.New("fcgi: connection to web server closed")</pre> <p>ErrRequestAborted is returned by Read when a handler attempts to read the body of a request that has been aborted by the web server. </p>
<pre data-language="go">var ErrRequestAborted = errors.New("fcgi: request aborted by web server")</pre> <h2 id="ProcessEnv">func <span>ProcessEnv</span> <span title="Added in Go 1.9">1.9</span> </h2> <pre data-language="go">func ProcessEnv(r *http.Request) map[string]string</pre> <p>ProcessEnv 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). </p>
<h2 id="Serve">func <span>Serve</span> </h2> <pre data-language="go">func Serve(l net.Listener, handler http.Handler) error</pre> <p>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, <span>http.DefaultServeMux</span> is used. </p><div class="_attribution">
<p class="_attribution-p">
© Google, Inc.<br>Licensed under the Creative Commons Attribution License 3.0.<br>
<a href="http://golang.org/pkg/net/http/fcgi/" class="_attribution-link">http://golang.org/pkg/net/http/fcgi/</a>
</p>
</div>
|