aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files/src/file_sender.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/http-files/src/file_sender.vala')
-rw-r--r--plugins/http-files/src/file_sender.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/http-files/src/file_sender.vala b/plugins/http-files/src/file_sender.vala
index 957611d0..a2f4769b 100644
--- a/plugins/http-files/src/file_sender.vala
+++ b/plugins/http-files/src/file_sender.vala
@@ -94,7 +94,10 @@ public class HttpFileSender : FileSender, Object {
if (stream == null) return;
var put_message = new Soup.Message("PUT", file_send_data.url_up);
+
#if SOUP_3_0
+ string transfer_host = Uri.parse(file_send_data.url_up, UriFlags.NONE).get_host();
+ put_message.accept_certificate.connect((peer_cert, errors) => { return ConnectionManager.on_invalid_certificate(transfer_host, peer_cert, errors); });
put_message.set_request_body(file_meta.mime_type, file_transfer.input_stream, (ssize_t) file_meta.size);
#else
put_message.request_headers.set_content_type(file_meta.mime_type, null);