aboutsummaryrefslogtreecommitdiff
path: root/captain/response.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-05-07 09:42:16 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-05-07 09:42:16 -0400
commit0f31824a5e4969d56d88678e05274163be3d8b77 (patch)
tree1d2a7b5f84d1413166509fb677f3d770b2d646ef /captain/response.f90
parente7848c2d61bb8fb13b4620ba0c8eaf20a1965ffa (diff)
downloadlevitating-0f31824a5e4969d56d88678e05274163be3d8b77.tar.gz
levitating-0f31824a5e4969d56d88678e05274163be3d8b77.zip
Instructions and players now displayed via the CGI interface. Added 'page' member to the request derived type.
Diffstat (limited to 'captain/response.f90')
-rw-r--r--captain/response.f9016
1 files changed, 16 insertions, 0 deletions
diff --git a/captain/response.f90 b/captain/response.f90
index a4fe24e..610b070 100644
--- a/captain/response.f90
+++ b/captain/response.f90
@@ -61,6 +61,7 @@ implicit none
character(len=:), pointer::server => null()
character(len=:), pointer::protocol => null()
character(len=:), pointer::location => null()
+ character(len=:), pointer::page => null()
character(len=:), pointer::query_string => null()
contains
@@ -101,6 +102,7 @@ contains
character(*), intent(in)::str
character(*), intent(in), optional::server_explicit, protocol_explicit
+ character(len=:), allocatable::temppage
integer::i, j, n
n = len_trim(str)
@@ -168,6 +170,16 @@ contains
call write_log("Location: "//self%location, LOG_DEBUG)
end if
+ ! and page, which is really just a last location if there is an extension...
+ ! I realize this is not so great, but whatever.
+ allocate(character(len=len(self%location)) :: temppage)
+ call self%last_component(temppage)
+ if(index(temppage, ".") > 0) then
+ allocate(character(len=len_trim(temppage)) :: self%page)
+ self%page = temppage
+ end if
+ deallocate(temppage)
+
end subroutine request_init
function request_component_start_location(self, i_component) result(res)
@@ -341,6 +353,10 @@ contains
deallocate(self%protocol)
end if
+ if(associated(self%page)) then
+ deallocate(self%page)
+ end if
+
end subroutine request_destroy
subroutine response_destroy(resp)