diff options
Diffstat (limited to 'captain/external.f90')
-rw-r--r-- | captain/external.f90 | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/captain/external.f90 b/captain/external.f90 index a86bd52..97fa69c 100644 --- a/captain/external.f90 +++ b/captain/external.f90 @@ -595,6 +595,7 @@ contains use config use utilities use server_response + use special_filenames implicit none class(request), intent(in)::req @@ -604,28 +605,7 @@ contains logical::exists resp%temporary_file = .false. - - call req%path_component(1, category) - call req%last_component(filename) - - call write_log("Catgeory: "//trim(category)//" File: "//trim(filename)) - - if(category == "releases") then - allocate(character(len=(len_trim(release_dir)+len_trim(filename)+1)) :: resp%body_filename) - call combine_paths(release_dir, filename, resp%body_filename) - else if(category == "uploads") then - allocate(character(len=(len_trim(release_dir)+len_trim(filename)+1)) :: resp%body_filename) - call combine_paths(release_dir, filename, resp%body_filename) - else if(category == "results") then - allocate(character(len=(len_trim(results_dir)+len_trim(filename)+1)) :: resp%body_filename) - call combine_paths(results_dir, filename, resp%body_filename) - else if(category == "static") then - allocate(character(len=(len_trim(static_dir)+len_trim(filename)+1)) :: resp%body_filename) - call combine_paths(static_dir, filename, resp%body_filename) - else if(category == "favicon.txt") then - allocate(character(len=(len_trim(static_dir)+len_trim(filename)+1)) :: resp%body_filename) - call combine_paths(static_dir, filename, resp%body_filename) - end if + resp%body_filename => get_special_full_filename(category, filename) inquire(file=resp%body_filename, exist=exists) if(.not. exists) then |