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/postutils.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/postutils.f90')
-rw-r--r-- | captain/postutils.f90 | 11 |
1 files changed, 8 insertions, 3 deletions
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 |