aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
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.)