From dc7be11925daecbc180e039b60e6bda1226c4401 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Mon, 6 Jan 2025 15:35:51 -0500 Subject: Fixed crash on captain when no url is provided --- captain/response.f90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3