aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Services/IRequest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Services/IRequest.cs')
-rw-r--r--MediaBrowser.Model/Services/IRequest.cs37
1 files changed, 6 insertions, 31 deletions
diff --git a/MediaBrowser.Model/Services/IRequest.cs b/MediaBrowser.Model/Services/IRequest.cs
index ac9b981b9..edb5a2509 100644
--- a/MediaBrowser.Model/Services/IRequest.cs
+++ b/MediaBrowser.Model/Services/IRequest.cs
@@ -1,20 +1,15 @@
using System;
using System.Collections.Generic;
using System.IO;
-using System.Net;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.IO;
+using Microsoft.AspNetCore.Http;
namespace MediaBrowser.Model.Services
{
public interface IRequest
{
- /// <summary>
- /// The underlying ASP.NET or HttpListener HttpRequest
- /// </summary>
- object OriginalRequest { get; }
-
IResponse Response { get; }
/// <summary>
@@ -41,8 +36,6 @@ namespace MediaBrowser.Model.Services
string UserAgent { get; }
- IDictionary<string, Cookie> Cookies { get; }
-
/// <summary>
/// The expected Response ContentType for this request
/// </summary>
@@ -53,9 +46,9 @@ namespace MediaBrowser.Model.Services
/// </summary>
Dictionary<string, object> Items { get; }
- QueryParamCollection Headers { get; }
+ IHeaderDictionary Headers { get; }
- QueryParamCollection QueryString { get; }
+ IQueryCollection QueryString { get; }
Task<QueryParamCollection> GetFormData();
@@ -64,11 +57,6 @@ namespace MediaBrowser.Model.Services
string AbsoluteUri { get; }
/// <summary>
- /// The Remote Ip as reported by Request.UserHostAddress
- /// </summary>
- string UserHostAddress { get; }
-
- /// <summary>
/// The Remote Ip as reported by X-Forwarded-For, X-Real-IP or Request.UserHostAddress
/// </summary>
string RemoteIp { get; }
@@ -78,11 +66,6 @@ namespace MediaBrowser.Model.Services
/// </summary>
string Authorization { get; }
- /// <summary>
- /// e.g. is https or not
- /// </summary>
- bool IsSecureConnection { get; }
-
string[] AcceptTypes { get; }
string PathInfo { get; }
@@ -135,24 +118,16 @@ namespace MediaBrowser.Model.Services
Stream OutputStream { get; }
/// <summary>
- /// Signal that this response has been handled and no more processing should be done.
- /// When used in a request or response filter, no more filters or processing is done on this request.
- /// </summary>
- void Close();
-
- /// <summary>
/// Gets a value indicating whether this instance is closed.
/// </summary>
- bool IsClosed { get; }
-
- void SetContentLength(long contentLength);
+ bool IsClosed { get; set; }
//Add Metadata to Response
Dictionary<string, object> Items { get; }
- QueryParamCollection Headers { get; }
+ IHeaderDictionary Headers { get; }
- Task TransmitFile(string path, long offset, long count, FileShareMode fileShareMode, CancellationToken cancellationToken);
+ Task TransmitFile(string path, long offset, long count, FileShareMode fileShareMode, IFileSystem fileSystem, IStreamHelper streamHelper, CancellationToken cancellationToken);
bool SendChunked { get; set; }
}