summaryrefslogtreecommitdiff
path: root/plugins/common/RESTSupport.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:11:58 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:11:58 +0100
commitccff5442184e84d511c2bd25ed3da53e4336a272 (patch)
tree8402a0ba68852e0aec5841ed4519ccfe88352223 /plugins/common/RESTSupport.vala
parenta1e1833f48ed618273dab9198b547148a89832a7 (diff)
parent4a3f1fdfe1eb3743564adcee35d5513224339260 (diff)
Merge tag 'upstream/0.25.1'
Upstream version 0.25.1
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 1a9052b..b76bead 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.KnownStatusCode.OK:
- case Soup.KnownStatusCode.CREATED: // HTTP code 201 (CREATED) signals that a new
- // resource was created in response to a PUT or POST
+ 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
break;
- case Soup.KnownStatusCode.CANT_RESOLVE:
- case Soup.KnownStatusCode.CANT_RESOLVE_PROXY:
+ case Soup.Status.CANT_RESOLVE:
+ case Soup.Status.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.KnownStatusCode.CANT_CONNECT:
- case Soup.KnownStatusCode.CANT_CONNECT_PROXY:
+ case Soup.Status.CANT_CONNECT:
+ case Soup.Status.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.KnownStatusCode.SSL_FAILED:
+ case Soup.Status.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(Soup.MemoryUse.COPY, payload.data[0:payload_length]);
+ Soup.Buffer bindable_data = new Soup.Buffer.take (payload.data);
message_parts.append_form_file("", publishable.get_serialized_file().get_path(), mime_type,
bindable_data);