dm_fcgi_read_to_file Function

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.

The function returns the following error codes:

  • E_BOUNDS if content length is negative.
  • E_EMPTY if content length is zero.
  • E_IO if file could not be opened.
  • E_WRITE if writing to file failed.

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