aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files/src/file_provider.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/http-files/src/file_provider.vala')
-rw-r--r--plugins/http-files/src/file_provider.vala10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala
index 34c3a48a..d62e3561 100644
--- a/plugins/http-files/src/file_provider.vala
+++ b/plugins/http-files/src/file_provider.vala
@@ -120,6 +120,11 @@ public class FileProvider : Dino.FileProvider, Object {
var head_message = new Soup.Message("HEAD", http_receive_data.url);
head_message.request_headers.append("Accept-Encoding", "identity");
+#if SOUP_3_0
+ string transfer_host = Uri.parse(http_receive_data.url, UriFlags.NONE).get_host();
+ head_message.accept_certificate.connect((peer_cert, errors) => { return ConnectionManager.on_invalid_certificate(transfer_host, peer_cert, errors); });
+#endif
+
try {
#if SOUP_3_0
yield session.send_async(head_message, GLib.Priority.LOW, null);
@@ -153,6 +158,11 @@ public class FileProvider : Dino.FileProvider, Object {
var get_message = new Soup.Message("GET", http_receive_data.url);
+#if SOUP_3_0
+ string transfer_host = Uri.parse(http_receive_data.url, UriFlags.NONE).get_host();
+ get_message.accept_certificate.connect((peer_cert, errors) => { return ConnectionManager.on_invalid_certificate(transfer_host, peer_cert, errors); });
+#endif
+
try {
#if SOUP_3_0
InputStream stream = yield session.send_async(get_message, GLib.Priority.LOW, file_transfer.cancellable);