aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
diff options
context:
space:
mode:
authorSenorSmartyPants <senorsmartypants@gmail.com>2022-01-07 18:21:48 -0600
committerSenorSmartyPants <senorsmartypants@gmail.com>2022-01-07 18:21:48 -0600
commit3ea54a8009617998e7250a39e33a9da3440a9631 (patch)
tree1335a6b4d4df59e08ffd0c490b72d39674b9102e /Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
parentbd2bec4d4aedb1e39082d51abd75797eaf42b28a (diff)
Remove isHeadRequest from GetStaticFile method signatures
Diffstat (limited to 'Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs')
-rw-r--r--Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs6
1 files changed, 0 insertions, 6 deletions
diff --git a/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs b/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
index 639bbb82e..c99b911bb 100644
--- a/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
+++ b/Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
@@ -22,14 +22,12 @@ namespace Jellyfin.Api.Helpers
/// Returns a static file from a remote source.
/// </summary>
/// <param name="state">The current <see cref="StreamState"/>.</param>
- /// <param name="isHeadRequest">Whether the current request is a HTTP HEAD request so only the headers get returned.</param>
/// <param name="httpClient">The <see cref="HttpClient"/> making the remote request.</param>
/// <param name="httpContext">The current http context.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the operation.</param>
/// <returns>A <see cref="Task{ActionResult}"/> containing the API response.</returns>
public static async Task<ActionResult> GetStaticRemoteStreamResult(
StreamState state,
- bool isHeadRequest,
HttpClient httpClient,
HttpContext httpContext,
CancellationToken cancellationToken = default)
@@ -53,17 +51,13 @@ namespace Jellyfin.Api.Helpers
/// </summary>
/// <param name="path">The path to the file.</param>
/// <param name="contentType">The content type of the file.</param>
- /// <param name="isHeadRequest">Whether the current request is a HTTP HEAD request so only the headers get returned.</param>
/// <param name="httpContext">The current http context.</param>
/// <returns>An <see cref="ActionResult"/> the file.</returns>
public static ActionResult GetStaticFileResult(
string path,
string contentType,
- bool isHeadRequest,
HttpContext httpContext)
{
- httpContext.Response.ContentType = contentType;
-
return new PhysicalFileResult(path, contentType) { EnableRangeProcessing = true };
}