summaryrefslogtreecommitdiff
path: root/plugins/common/RESTSupport.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-01-21 19:19:04 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-01-21 19:19:04 +0100
commitf39ea21098340bd99c48669f152c9068046c2c99 (patch)
treed1166fce1a4a8c470dfaf364816f767678c4729e /plugins/common/RESTSupport.vala
parentbc48a4cff815ed156b603c92e684779c317417ba (diff)
parenta7ff7c49085c320c1e0a2ffb66cc6d283c5acb8e (diff)
Merge tag 'upstream/0.25.3'
Upstream version 0.25.3
Diffstat (limited to 'plugins/common/RESTSupport.vala')
-rw-r--r--plugins/common/RESTSupport.vala18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/common/RESTSupport.vala b/plugins/common/RESTSupport.vala
index b76bead..1a9052b 100644
--- a/plugins/common/RESTSupport.vala
+++ b/plugins/common/RESTSupport.vala
@@ -246,21 +246,21 @@ public class Transaction {
protected void check_response(Soup.Message message) throws Spit.Publishing.PublishingError {
switch (message.status_code) {
- case Soup.Status.OK:
- case Soup.Status.CREATED: // HTTP code 201 (CREATED) signals that a new
- // resource was created in response to a PUT or POST
+ case Soup.KnownStatusCode.OK:
+ case Soup.KnownStatusCode.CREATED: // HTTP code 201 (CREATED) signals that a new
+ // resource was created in response to a PUT or POST
break;
- case Soup.Status.CANT_RESOLVE:
- case Soup.Status.CANT_RESOLVE_PROXY:
+ case Soup.KnownStatusCode.CANT_RESOLVE:
+ case Soup.KnownStatusCode.CANT_RESOLVE_PROXY:
throw new Spit.Publishing.PublishingError.NO_ANSWER("Unable to resolve %s (error code %u)",
get_endpoint_url(), message.status_code);
- case Soup.Status.CANT_CONNECT:
- case Soup.Status.CANT_CONNECT_PROXY:
+ case Soup.KnownStatusCode.CANT_CONNECT:
+ case Soup.KnownStatusCode.CANT_CONNECT_PROXY:
throw new Spit.Publishing.PublishingError.NO_ANSWER("Unable to connect to %s (error code %u)",
get_endpoint_url(), message.status_code);
- case Soup.Status.SSL_FAILED:
+ case Soup.KnownStatusCode.SSL_FAILED:
throw new Spit.Publishing.PublishingError.SSL_FAILED ("Unable to connect to %s: Secure connection failed",
get_endpoint_url ());
@@ -511,7 +511,7 @@ public class UploadTransaction : Transaction {
int payload_part_num = message_parts.get_length();
- Soup.Buffer bindable_data = new Soup.Buffer.take (payload.data);
+ Soup.Buffer bindable_data = new Soup.Buffer(Soup.MemoryUse.COPY, payload.data[0:payload_length]);
message_parts.append_form_file("", publishable.get_serialized_file().get_path(), mime_type,
bindable_data);