aboutsummaryrefslogtreecommitdiff
path: root/captain/response.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2025-01-06 15:35:51 -0500
committerJeffrey Armstrong <jeff@approximatrix.com>2025-01-06 15:35:51 -0500
commitdc7be11925daecbc180e039b60e6bda1226c4401 (patch)
tree61a4eb9c377a4f63db9d2e3b8cb4a36cd4883a7c /captain/response.f90
parentf7fc2a99bc435bfa699c710f2f6204d99379e1c2 (diff)
downloadlevitating-dc7be11925daecbc180e039b60e6bda1226c4401.tar.gz
levitating-dc7be11925daecbc180e039b60e6bda1226c4401.zip
Fixed crash on captain when no url is provided
Diffstat (limited to 'captain/response.f90')
-rw-r--r--captain/response.f907
1 files changed, 6 insertions, 1 deletions
diff --git a/captain/response.f90 b/captain/response.f90
index 6d9bf46..c6d9d07 100644
--- a/captain/response.f90
+++ b/captain/response.f90
@@ -182,7 +182,7 @@ contains
end function gemini_session_link_url
- subroutine request_init(self, fullurl, query_start_char, query_separator)
+ recursive subroutine request_init(self, fullurl, query_start_char, query_separator)
use logging
use utilities, only: toupper
use captain_db, only: get_session_auth_db
@@ -203,6 +203,11 @@ contains
self%url = trim(fullurl)
call write_log("URL: "//self%url, LOG_NORMAL)
+ if(n == 0) then
+ call request_init(self, "/", query_start_char, query_separator)
+ return
+ end if
+
i = index(fullurl, "://")
if(i >= 1) then
allocate(character(len=(i-1)) :: self%protocol)