dm_fcgi Module

FastCGI interface bindings and procedures.


Uses

  • module~~dm_fcgi~~UsesGraph module~dm_fcgi dm_fcgi iso_c_binding iso_c_binding module~dm_fcgi->iso_c_binding module~dm_cgi dm_cgi module~dm_fcgi->module~dm_cgi module~dm_error dm_error module~dm_fcgi->module~dm_error module~dm_kind dm_kind module~dm_fcgi->module~dm_kind module~dm_cgi->module~dm_error module~dm_cgi->module~dm_kind module~dm_ascii dm_ascii module~dm_cgi->module~dm_ascii module~dm_hash dm_hash module~dm_cgi->module~dm_hash module~dm_http dm_http module~dm_cgi->module~dm_http module~dm_mime dm_mime module~dm_cgi->module~dm_mime module~dm_string dm_string module~dm_cgi->module~dm_string module~dm_time dm_time module~dm_cgi->module~dm_time module~dm_util dm_util module~dm_cgi->module~dm_util module~dm_error->module~dm_kind module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_hash->module~dm_kind module~dm_platform dm_platform module~dm_hash->module~dm_platform module~dm_string->module~dm_error module~dm_string->module~dm_kind module~dm_time->module~dm_error module~dm_time->module~dm_kind module~dm_time->module~dm_util unix unix module~dm_time->unix module~dm_util->module~dm_error module~dm_util->module~dm_kind

Used by

  • module~~dm_fcgi~~UsedByGraph module~dm_fcgi dm_fcgi module~dmpack dmpack module~dmpack->module~dm_fcgi

Functions

public function dm_fcgi_accept() result(accept)

Accepts new FastCGI connection (blocking). The function returns .false. on error.

Read more…

Arguments

None

Return Value logical

public function dm_fcgi_read(env, content) result(rc)

Reads HTTP request body (POST method). The the content length is 0, the argument content will be allocated but empty on output.

Read more…

Arguments

Type IntentOptional Attributes Name
type(cgi_env_type), intent(inout) :: env

CGI environment.

character(len=:), intent(out), allocatable :: content

Returned request body.

Return Value integer

public function dm_fcgi_read_to_file(env, path) result(rc)

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.

Read more…

Arguments

Type IntentOptional Attributes Name
type(cgi_env_type), intent(inout) :: env

CGI environment.

character(len=*), intent(in) :: path

Path of output file.

Return Value integer


Subroutines

public subroutine dm_fcgi_header(content_type, http_status, http_headers)

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.

Read more…

Arguments

Type IntentOptional 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.

public subroutine dm_fcgi_write(content)

Writes given content as response. The argument will be null-terminated.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: content

Response content.