diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-01-21 19:17:10 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-01-21 19:17:10 +0100 |
commit | a7ff7c49085c320c1e0a2ffb66cc6d283c5acb8e (patch) | |
tree | d9f86def771c7845f241ec81219b243c70523c60 /plugins/common/RESTSupport.vala | |
parent | 66f6a7bd3f7e00022191f16cb0e82a39e7333a76 (diff) |
New upstream version 0.25.3upstream/0.25.3
Diffstat (limited to 'plugins/common/RESTSupport.vala')
-rw-r--r-- | plugins/common/RESTSupport.vala | 18 |
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); |