diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-11-25 04:10:33 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-11-25 04:10:33 +0100 |
commit | 4a3f1fdfe1eb3743564adcee35d5513224339260 (patch) | |
tree | 1bcc97c9bd5abcf181b9f19294a0f187ff8af103 /plugins/common/RESTSupport.vala | |
parent | 7152401783578b56343f578b4ec920998660de33 (diff) |
New upstream version 0.25.1upstream/0.25.1
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 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); |