diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-03-27 18:12:44 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-03-27 18:12:44 -0400 |
commit | c7bf38f440c3e1cafd2ddb35d4505e936d4e3e86 (patch) | |
tree | fadb6178fb5be6316c6e71774d3fb6f7f425bf70 /captain/gemini.f90 | |
parent | fd9077056f7f33c60b218636ead0644d42e75a09 (diff) | |
download | levitating-c7bf38f440c3e1cafd2ddb35d4505e936d4e3e86.tar.gz levitating-c7bf38f440c3e1cafd2ddb35d4505e936d4e3e86.zip |
Starting work towards processing external gemini requests.
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 |