mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
c720504e39
Drop ETag and use Last-Modified since performance is much better
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Threading.Tasks;
|
|
|
|
using MediaBrowser.Model.IO;
|
|
|
|
namespace MediaBrowser.Controller.Net
|
|
{
|
|
public class StaticResultOptions
|
|
{
|
|
public string ContentType { get; set; }
|
|
public TimeSpan? CacheDuration { get; set; }
|
|
public DateTime? DateLastModified { get; set; }
|
|
public Func<Task<Stream>> ContentFactory { get; set; }
|
|
|
|
public bool IsHeadRequest { get; set; }
|
|
|
|
public IDictionary<string, string> ResponseHeaders { get; set; }
|
|
|
|
public Action OnComplete { get; set; }
|
|
public Action OnError { get; set; }
|
|
|
|
public string Path { get; set; }
|
|
public long? ContentLength { get; set; }
|
|
|
|
public FileShareMode FileShare { get; set; }
|
|
|
|
public StaticResultOptions()
|
|
{
|
|
ResponseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
|
FileShare = FileShareMode.Read;
|
|
}
|
|
}
|
|
|
|
public class StaticFileResultOptions : StaticResultOptions
|
|
{
|
|
}
|
|
}
|