aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files/src/file_sender.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2022-11-03 09:46:07 -0600
committerfiaxh <git@lightrise.org>2022-11-03 14:10:57 -0600
commit6e37f3fe3fa0f4ce9a25a91e9d97191c8e4abec1 (patch)
tree82ab76feb349dceccdfe3e362f211ca3cff7c10e /plugins/http-files/src/file_sender.vala
parent809c1579e41000f2f43eeb05735afc8165a1a430 (diff)
downloaddino-6e37f3fe3fa0f4ce9a25a91e9d97191c8e4abec1.tar.gz
dino-6e37f3fe3fa0f4ce9a25a91e9d97191c8e4abec1.zip
Automatically select appropriate libsoup version
Diffstat (limited to 'plugins/http-files/src/file_sender.vala')
-rw-r--r--plugins/http-files/src/file_sender.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/http-files/src/file_sender.vala b/plugins/http-files/src/file_sender.vala
index ab81ffce..a39d695b 100644
--- a/plugins/http-files/src/file_sender.vala
+++ b/plugins/http-files/src/file_sender.vala
@@ -73,7 +73,7 @@ public class HttpFileSender : FileSender, Object {
}
}
-#if !SOUP_3
+#if !SOUP_3_0
private static void transfer_more_bytes(InputStream stream, Soup.MessageBody body) {
uint8[] bytes = new uint8[4096];
ssize_t read = stream.read(bytes);
@@ -93,7 +93,7 @@ public class HttpFileSender : FileSender, Object {
var session = new Soup.Session();
session.user_agent = @"Dino/$(Dino.get_short_version()) ";
var put_message = new Soup.Message("PUT", file_send_data.url_up);
-#if SOUP_3
+#if SOUP_3_0
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);
@@ -106,7 +106,7 @@ public class HttpFileSender : FileSender, Object {
put_message.request_headers.append(entry.key, entry.value);
}
try {
-#if SOUP_3
+#if SOUP_3_0
yield session.send_async(put_message, GLib.Priority.LOW, file_transfer.cancellable);
#else
yield session.send_async(put_message, file_transfer.cancellable);