Skip to main content

Module cgi

Module cgi 

Source
Expand description

CGI (Common Gateway Interface) handler.

Executes a CGI script as a subprocess, setting the standard CGI environment variables, piping the request body to stdin, and parsing the script’s stdout as a CGI-style response (headers followed by body).

Structs§

CgiHandler
CGI handler: executes scripts rooted at a given directory.

Functions§

parse_cgi_response
Parse the raw CGI output (headers \r\n\r\n or \n\n separated from body) into an HTTP response.