mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
Properly set content type
This commit is contained in:
committed by
Joshua M. Boniface
parent
4f17ed961e
commit
b1bd062709
@@ -301,23 +301,15 @@ namespace Emby.Server.Implementations.HttpClientManager
|
||||
}
|
||||
else if (options.RequestContent != null)
|
||||
{
|
||||
httpWebRequest.Content = new StringContent(options.RequestContent);
|
||||
httpWebRequest.Content = new StringContent(
|
||||
options.RequestContent,
|
||||
null,
|
||||
options.RequestContentType);
|
||||
}
|
||||
else
|
||||
{
|
||||
httpWebRequest.Content = new ByteArrayContent(Array.Empty<byte>());
|
||||
}
|
||||
|
||||
// TODO: add correct content type
|
||||
/*
|
||||
var contentType = options.RequestContentType ?? "application/x-www-form-urlencoded";
|
||||
|
||||
if (options.AppendCharsetToMimeType)
|
||||
{
|
||||
contentType = contentType.TrimEnd(';') + "; charset=\"utf-8\"";
|
||||
}
|
||||
|
||||
httpWebRequest.Headers.Add(HeaderNames.ContentType, contentType);*/
|
||||
}
|
||||
|
||||
if (options.LogRequest)
|
||||
|
||||
Reference in New Issue
Block a user