From 9ac19f108c1b69025572bf32e310b332ef098c98 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 12 May 2021 13:05:42 -0400 Subject: Fixed post query processing caused by sloppiness. Adding a player via the web interface now works. --- captain/postutils.f90 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'captain/postutils.f90') diff --git a/captain/postutils.f90 b/captain/postutils.f90 index c5af8bd..2961f98 100644 --- a/captain/postutils.f90 +++ b/captain/postutils.f90 @@ -7,6 +7,7 @@ contains function read_post_contents() result(res) use query_utilities, only: query + use logging implicit none type(query)::res @@ -17,17 +18,19 @@ contains call get_environment_variable("CONTENT_LENGTH", header_info, status=istat) if(istat == 0) then - read(header_info, '(I8)') content_length + read(header_info, *) content_length else content_length = 0 end if + call write_log("Content Length is: "//trim(header_info), LOG_DEBUG) call get_environment_variable("CONTENT_TYPE", header_info, status=istat) if(content_length > 0 .and. & istat == 0 .and. & - trim(header_info) /= content_type_required) & + trim(header_info) == content_type_required) & then - + call write_log("Processing post", LOG_DEBUG) + allocate(character(len=content_length) :: transfered) do i = 1, content_length @@ -39,6 +42,8 @@ contains deallocate(transfered) end if + + call write_log("Content Type is: "//trim(header_info), LOG_DEBUG) end function read_post_contents -- cgit v1.2.3