Skip to content

Commit

Permalink
Fix Content-Type header bug for .NET Core on Mac and Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiming Yuan committed Jan 11, 2017
1 parent eeefcf7 commit a9c9a1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dropbox.Api/DropboxRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ private async Task<Result> RequestJsonString(
break;
case RouteStyle.Download:
request.Headers.Add(DropboxApiArgHeader, requestArg);

// This is required to force libcurl remove default content type header.
request.Content = new StringContent("");
request.Content.Headers.ContentType = null;

completionOption = HttpCompletionOption.ResponseHeadersRead;
break;
case RouteStyle.Upload:
Expand Down

0 comments on commit a9c9a1c

Please sign in to comment.