diff options
Diffstat (limited to 'captain/gemini.f90')
-rw-r--r-- | captain/gemini.f90 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/captain/gemini.f90 b/captain/gemini.f90 index ce7b984..7f21392 100644 --- a/captain/gemini.f90 +++ b/captain/gemini.f90 @@ -120,11 +120,17 @@ contains call write_log("Request is "//trim(request)) - ! If it ends in a slash, let's manually and silently add "index.gmi" - if(request(len_trim(request):len_trim(request)) == "/") then - request = trim(request)//"index.gmi" + if(len_trim(request) .ge. 4) then + if(request(1:4) == '/api') then + !call handle_api_request(request) + else + call external_request_gemini(request) + end if + else + call external_request_gemini(request) end if - + + end subroutine handle_request |