Files
kcgi/man/khttp_fcgi_parse.3
2018-04-09 22:52:37 +00:00

71 lines
1.9 KiB
Plaintext

.\" $Id$
.\"
.\" Copyright (c) 2015 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate$
.Dt KHTTP_FCGI_PARSE 3
.Os
.Sh NAME
.Nm khttp_fcgi_parse
.Nd parse a FastCGI instance for kcgi
.Sh LIBRARY
.Lb libkcgi
.Sh SYNOPSIS
.In sys/types.h
.In stdarg.h
.In stdint.h
.In kcgi.h
.Ft "enum kcgi_err"
.Fo khttp_fcgi_parse
.Fa "struct kfcgi *fcgi"
.Fa "struct kreq *req"
.Fc
.Sh DESCRIPTION
The
.Fn khttp_fcgi_parse
function parses and validates a single FastCGI request.
They may be invoked as many times as necessary, but must follow a call
to
.Xr khttp_fcgi_init 3
and be followed by
.Xr khttp_fcgi_free 3 .
.Pp
The
.Fa req
object filled in by
.Fn khttp_fcgi_parse
must be matched by
.Xr khttp_free 3
if and only if the return value is
.Dv KCGI_OK .
Otherwise, resources are internally freed.
.Sh RETURN VALUES
These are the same as in
.Xr khttp_parse 3 ,
except the
.Dv KCGI_EXIT
return code indicates that no more requests will arrive and the
application should exit.
.Sh SEE ALSO
.Xr kcgi 3 ,
.Xr khttp_fcgi_init 3 ,
.Xr khttp_free 3 ,
.Xr khttp_parse 3
.Sh AUTHORS
The
.Fn khttp_fcgi_parse
function was written by
.An Kristaps Dzonsons Aq Mt kristaps@bsd.lv .