diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-05-12 13:05:42 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-05-12 13:05:42 -0400 |
commit | 9ac19f108c1b69025572bf32e310b332ef098c98 (patch) | |
tree | d6499920f2c42d162514f85df6a10526e0b6a24a /captain/response.f90 | |
parent | 738833d70c8d6cca3bbf9efe0c8dd24ed0395dde (diff) | |
download | levitating-9ac19f108c1b69025572bf32e310b332ef098c98.tar.gz levitating-9ac19f108c1b69025572bf32e310b332ef098c98.zip |
Fixed post query processing caused by sloppiness. Adding a player via the web interface now works.
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) |