diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2025-01-06 15:35:51 -0500 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2025-01-06 15:35:51 -0500 |
commit | dc7be11925daecbc180e039b60e6bda1226c4401 (patch) | |
tree | 61a4eb9c377a4f63db9d2e3b8cb4a36cd4883a7c | |
parent | f7fc2a99bc435bfa699c710f2f6204d99379e1c2 (diff) | |
download | levitating-dc7be11925daecbc180e039b60e6bda1226c4401.tar.gz levitating-dc7be11925daecbc180e039b60e6bda1226c4401.zip |
Fixed crash on captain when no url is provided
-rw-r--r-- | captain/response.f90 | 7 |
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) |