KHTTP_FCGI_PARSE(3)

πŸ“¦
version 1.0.1 Β· 2 versions
, in alpine 3.24

KHTTP_FCGI_PARSE(3) πŸ¦‹

okay bestie, welcome to the Library Functions Manual β€” this is the page for khttp_fcgi_parse, and it's giving β€œtiny function, very important rules.” πŸ’…

🌸 NAME 🌸

khttp_fcgi_parse β€” parse a FastCGI instance for kcgi

πŸ’– LIBRARY πŸ’–

This one lives in the library libkcgi β€” the page literally says library β€œlibkcgi”. πŸŽ€

✨ SYNOPSIS ✨

#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>

enum kcgi_err
khttp_fcgi_parse(struct kfcgi *fcgi, struct kreq *req);

🧚 DESCRIPTION 🧚

So khttp_fcgi_parse() is the function that parses and validates a single FastCGI request. That's the whole vibe: one request, parsed, validated, slay. ✨

You can invoke it as many times as necessary, but here's the sequencing tea: it must follow a call to khttp_fcgi_init(3) and it must be followed by khttp_fcgi_free(3). No skipping steps, bestie β€” the order is part of the lore. πŸ”₯

The req object filled in by khttp_fcgi_parse() must be matched by khttp_free(3) if and only if the return value is KCGI_OK. Otherwise, resources are internally freed. That β€œif and only if” is doing a LOT of work, so keep it close. 😭

πŸ‘‘ RETURN VALUES πŸ‘‘

These are the same as in khttp_parse(3), except the KCGI_EXIT return code indicates that no more requests will arrive and the application should exit. Periodt. πŸ’€

🌈 SEE ALSO 🌈

🫢 AUTHORS 🫢

The khttp_fcgi_parse() function was written by Kristaps Dzonsons <kristaps@bsd.lv>.


xoxo, bestie πŸ’– β€” Debian build, $Mdocdate$, KHTTP_FCGI_PARSE(3) πŸŽ€

πŸ“¦ where this page comes from
  • alpine 3.24: kcgi-doc 1.0.1-r0 Β· ISC
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms