mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
Removes Content-Lenght header for HEAD requests
This is done to be able to support transcoding for DLNA devices.
This commit is contained in:
parent
1a9e2dfd83
commit
4a795f96a1
1 changed files with 8 additions and 1 deletions
|
@ -9,6 +9,7 @@ using MediaBrowser.Controller.MediaInfo;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
using MediaBrowser.Model.Dto;
|
using MediaBrowser.Model.Dto;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
using ServiceStack.Web;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -280,7 +281,13 @@ namespace MediaBrowser.Api.Playback.Progressive
|
||||||
{
|
{
|
||||||
responseHeaders["Accept-Ranges"] = "none";
|
responseHeaders["Accept-Ranges"] = "none";
|
||||||
|
|
||||||
return ResultFactory.GetResult(new byte[] { }, contentType, responseHeaders);
|
var value = ResultFactory.GetResult(new byte[]{}, contentType, responseHeaders);
|
||||||
|
if (value as IHasOptions != null)
|
||||||
|
{
|
||||||
|
if (((IHasOptions)value).Options.ContainsKey("Content-Length"))
|
||||||
|
((IHasOptions)value).Options.Remove("Content-Length");
|
||||||
|
}
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!File.Exists(outputPath))
|
if (!File.Exists(outputPath))
|
||||||
|
|
Loading…
Reference in a new issue