aboutsummaryrefslogtreecommitdiff
path: root/captain/postutils.f90
diff options
context:
space:
mode:
Diffstat (limited to 'captain/postutils.f90')
-rw-r--r--captain/postutils.f9011
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