aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2022-06-29 08:40:04 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2022-06-29 08:40:04 -0400
commit10247d7db2aaffdc617066fa261de8df6454e966 (patch)
treea5a17fde9904b27e57fa51357cbd8ae1cfe0f8d9 /common
parent6f681035a7c7125a72ce04d6881c1579bdb96d09 (diff)
parentfb7136be64188cab7db34ac3ad6c8f27098173de (diff)
downloadlevitating-10247d7db2aaffdc617066fa261de8df6454e966.tar.gz
levitating-10247d7db2aaffdc617066fa261de8df6454e966.zip
Merge branch 'artifacts'
Diffstat (limited to 'common')
-rw-r--r--common/protocol.f9013
1 files changed, 10 insertions, 3 deletions
diff --git a/common/protocol.f90 b/common/protocol.f90
index 25050cb..9fc1171 100644
--- a/common/protocol.f90
+++ b/common/protocol.f90
@@ -207,7 +207,7 @@ contains
end function request_url
- function titan_post_url(url, unit_number, file_length, token, is_plain_text) result(returncode)
+ function titan_post_url(url, unit_number, file_length, token, is_plain_text, extra) result(returncode)
use request
use iso_c_binding
use utilities, only: read_into_buffer
@@ -218,6 +218,7 @@ contains
character(*), intent(in)::token
integer, intent(in)::unit_number
logical, intent(in), optional::is_plain_text
+ character(*), intent(in), optional::extra
integer::port
integer::returncode
@@ -230,7 +231,7 @@ contains
type(connection)::conn
character, dimension(BUFFER_SIZE)::buffer
- logical, dimension(4)::successes
+ logical, dimension(5)::successes
integer::i, bytes_read, bytes_written, total_written
! For direct processing of the reponse line
@@ -271,10 +272,16 @@ contains
trimming=.false., allow_trailing_null=.false.)
end if
+ if(present(extra)) then
+ successes(4) = send_string(conn%ssl, ";"//trim(extra), trimming=.false., allow_trailing_null=.false.)
+ else
+ successes(4) = .true.
+ end if
+
write(file_length_text, '(I14)') file_length
file_length_text = adjustl(file_length_text)
- successes(4) = send_string(conn%ssl, &
+ successes(5) = send_string(conn%ssl, &
";size="//trim(file_length_text)//c_carriage_return//c_new_line, &
trimming=.false., &
allow_trailing_null=.false.)