diff options
Diffstat (limited to 'captain/response.f90')
-rw-r--r-- | captain/response.f90 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/captain/response.f90 b/captain/response.f90 index dfce5e7..748dd39 100644 --- a/captain/response.f90 +++ b/captain/response.f90 @@ -109,6 +109,8 @@ contains character(len=:), allocatable::temppage integer::i, j, n + character(64)::msg + n = len_trim(str) allocate(character(len=n) :: self%url) self%url = trim(str) @@ -135,7 +137,7 @@ contains ! so we need to skip ahead of it in the URL if it is there... i = index(str, self%server) if(i > 0) then - i = i + len(self%server)+1 + i = i + len(self%server) else i = 1 end if @@ -149,17 +151,22 @@ contains allocate(character(len=(j-1)) :: self%server) self%server = str(i:(i+j-1)) + i = j+i-1 + end if call write_log("Server: "//self%server//"|", LOG_DEBUG) - i = j+i-1 j = index(str, "?") if(j == 0) then if(n-i+1 == 0) then allocate(character(len=1) :: self%location) self%location = "/" else + write(msg, '(I12,1X,I12)') i, n + call write_log("i n: "//trim(msg), LOG_DEBUG) + allocate(character(len=(n - i + 1)) :: self%location) + call write_log("str(i:n): "//str(i:n), LOG_DEBUG) self%location = str(i:n) end if call write_log("Location: "//self%location, LOG_DEBUG) |