FastCGI interface bindings and procedures.
Accepts new FastCGI connection (blocking). The function returns
.false.
on error.
Reads HTTP request body (POST method). The the content length is 0,
the argument content
will be allocated but empty on output.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cgi_env_type), | intent(inout) | :: | env |
CGI environment. |
||
character(len=:), | intent(out), | allocatable | :: | content |
Returned request body. |
Reads HTTP request body and writes content to file. No file will be created if the content length is 0. An existing file will be replaced.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(cgi_env_type), | intent(inout) | :: | env |
CGI environment. |
||
character(len=*), | intent(in) | :: | path |
Path of output file. |
Writes HTTP header. A sane HTTP server converts the status code in the header to a real HTTP status code, as we cannot return it in any other way with FastCGI. The default HTTP status code is 200.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | content_type |
MIME type. |
||
integer, | intent(in), | optional | :: | http_status |
HTTP status code. |
|
character(len=*), | intent(inout), | optional | :: | http_headers(:) |
Additional HTTP headers. |
Writes given content as response. The argument will be null-terminated.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | content |
Response content. |