aboutsummaryrefslogtreecommitdiff
path: root/captain/external.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-04-12 10:32:39 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-04-12 10:32:39 -0400
commitfca71fde0161a59ac650bd690a3413ffd866662d (patch)
tree72b1e6040f0b2401c358d54e1bdec9f0724a7d41 /captain/external.f90
parent025b5d1dcbb30e727afee3307d49328432bae603 (diff)
downloadlevitating-fca71fde0161a59ac650bd690a3413ffd866662d.tar.gz
levitating-fca71fde0161a59ac650bd690a3413ffd866662d.zip
URLs in instructions can now leave out the server implying download and upload from the server itself. Download and upload both work correctly.
Diffstat (limited to 'captain/external.f90')
-rw-r--r--captain/external.f9038
1 files changed, 37 insertions, 1 deletions
diff --git a/captain/external.f90 b/captain/external.f90
index 518abcb..c4dcb5a 100644
--- a/captain/external.f90
+++ b/captain/external.f90
@@ -791,4 +791,40 @@ contains
end function external_request_gemini
-end module external_handling \ No newline at end of file
+ function external_request_titan(req) result(resp)
+ use server_response
+ use special_filenames
+ use logging
+ implicit none
+
+ type(titan_request), intent(in)::req
+ type(response)::resp
+
+ character(len=:), pointer::fullpath
+ character(12)::job_text, task_text
+ integer::job_id, task_num
+
+ character(64)::msg
+
+ fullpath => get_full_filename_from_request(req)
+
+ if(associated(fullpath)) then
+
+ ! Write the file
+ call write_log("Storing titan file to "//trim(fullpath), LOG_DEBUG)
+
+ call req%write_to(fullpath)
+
+ resp%code = GEMINI_CODE_SUCCESS
+ call resp%set_body_contents(RESPONSE_JSON_OKAY)
+ resp%body_mimetype = "text/plain"
+
+ else
+
+ resp%code = GEMINI_CODE_PERMFAIL
+
+ end if
+
+ end function external_request_titan
+
+end module external_handling