From c710c466764d0a097d94fe9a8a4ee866d96df658 Mon Sep 17 00:00:00 2001 From: csware Date: Mon, 27 Apr 2015 18:58:09 +0200 Subject: [PATCH] Allow to download zip-attachments Fixes issue #784. --- Octokit/Http/HttpClientAdapter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Octokit/Http/HttpClientAdapter.cs b/Octokit/Http/HttpClientAdapter.cs index ec7ffd4b7d..94cb4a908f 100644 --- a/Octokit/Http/HttpClientAdapter.cs +++ b/Octokit/Http/HttpClientAdapter.cs @@ -76,8 +76,8 @@ protected async virtual Task BuildResponse(HttpResponseMessage respon { contentType = GetContentMediaType(responseMessage.Content); - // We added support for downloading images. Let's constrain this appropriately. - if (contentType == null || !contentType.StartsWith("image/")) + // We added support for downloading images and zip-files. Let's constrain this appropriately. + if (contentType == null || (!contentType.StartsWith("image/") && !contentType.StartsWith("application/"))) { responseBody = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); }