Skip to content

Commit

Permalink
Allow to download zip-attachments
Browse files Browse the repository at this point in the history
Fixes issue #784.
  • Loading branch information
csware committed Apr 27, 2015
1 parent 6854825 commit c710c46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Octokit/Http/HttpClientAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ protected async virtual Task<IResponse> 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);
}
Expand Down

0 comments on commit c710c46

Please sign in to comment.