KHTTP_FCGI_PARSE(3)

NAME
khttp_fcgi_parse, khttp_fcgi_parsex - parse a FastCGI instance for kcgi

LIBRARY
libkcgi

SYNOPSIS
#include <stdint.h>
#include <kcgi.h>
enum kcgi_err
khttp_fcgi_parse(struct kfcgi *fcgi, struct kreq *req, const char *const *pages, size_t pagesz, size_t defpage);
enum kcgi_err
khttp_fcgi_parsex(struct kfcgi *fcgi, struct kreq *req, const struct kmimemap *suffixes, const char *const *pages, size_t pagesz, size_t defmime, size_t defpage, void *arg);

DESCRIPTION
The khttp_fcgi_parse and khttp_fcgi_parsex functions parse and validate a single FastCGI request. They may be invoked as many times as necessary, but must follow a call to khttp_fcgi_init(3) and be followed by khttp_fcgi_free(3).

The collective arguments and return values are defined in khttp_parse(3).

The req object filled in by khttp_fcgi_parse or khttp_fcgi_parsex must be subsequently freed by khttp_free.

RETURN VALUES
These are the same as in khttp_parse(3), except the KCGI_HUP return code indicates that no more requests will arrive and the application should exit.

SEE ALSO
kcgi(3), khttp_fcgi_init(3), khttp_free(3)

AUTHORS
The khttp_fcgi_parse and khttp_fcgi_parsex functions were written by Kristaps Dzonsons <kristaps@bsd.lv>.