Skip to content

Commit a9c9a1c

Browse files
author
Qiming Yuan
committed
Fix Content-Type header bug for .NET Core on Mac and Linux.
1 parent eeefcf7 commit a9c9a1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dropbox.Api/DropboxRequestHandler.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@ private async Task<Result> RequestJsonString(
398398
break;
399399
case RouteStyle.Download:
400400
request.Headers.Add(DropboxApiArgHeader, requestArg);
401+
402+
// This is required to force libcurl remove default content type header.
403+
request.Content = new StringContent("");
404+
request.Content.Headers.ContentType = null;
405+
401406
completionOption = HttpCompletionOption.ResponseHeadersRead;
402407
break;
403408
case RouteStyle.Upload:

0 commit comments

Comments
 (0)