mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Remove some unused stuff
This commit is contained in:
parent
77addb2283
commit
25d3d0b731
@ -105,14 +105,6 @@ namespace Emby.Server.Implementations.SocketSharp
|
|||||||
await LoadWwwForm(form).ConfigureAwait(false);
|
await LoadWwwForm(form).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NET_4_0
|
|
||||||
if (validateRequestNewMode && !checked_form) {
|
|
||||||
// Setting this before calling the validator prevents
|
|
||||||
// possible endless recursion
|
|
||||||
checked_form = true;
|
|
||||||
ValidateNameValueCollection("Form", query_string_nvc, RequestValidationSource.Form);
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
if (validate_form && !checked_form)
|
if (validate_form && !checked_form)
|
||||||
{
|
{
|
||||||
checked_form = true;
|
checked_form = true;
|
||||||
@ -129,8 +121,6 @@ namespace Emby.Server.Implementations.SocketSharp
|
|||||||
protected bool validate_cookies { get; set; }
|
protected bool validate_cookies { get; set; }
|
||||||
protected bool validate_query_string { get; set; }
|
protected bool validate_query_string { get; set; }
|
||||||
protected bool validate_form { get; set; }
|
protected bool validate_form { get; set; }
|
||||||
protected bool checked_cookies { get; set; }
|
|
||||||
protected bool checked_query_string { get; set; }
|
|
||||||
protected bool checked_form { get; set; }
|
protected bool checked_form { get; set; }
|
||||||
|
|
||||||
private static void ThrowValidationException(string name, string key, string value)
|
private static void ThrowValidationException(string name, string key, string value)
|
||||||
@ -210,13 +200,6 @@ namespace Emby.Server.Implementations.SocketSharp
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ValidateInput()
|
|
||||||
{
|
|
||||||
validate_cookies = true;
|
|
||||||
validate_query_string = true;
|
|
||||||
validate_form = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsContentType(string ct, bool starts_with)
|
private bool IsContentType(string ct, bool starts_with)
|
||||||
{
|
{
|
||||||
if (ct == null || ContentType == null)
|
if (ct == null || ContentType == null)
|
||||||
|
@ -48,8 +48,6 @@ namespace Emby.Server.Implementations.SocketSharp
|
|||||||
|
|
||||||
public string AbsoluteUri => request.GetDisplayUrl().TrimEnd('/');
|
public string AbsoluteUri => request.GetDisplayUrl().TrimEnd('/');
|
||||||
|
|
||||||
public string UserHostAddress => request.HttpContext.Connection.RemoteIpAddress.ToString();
|
|
||||||
|
|
||||||
public string XForwardedFor
|
public string XForwardedFor
|
||||||
=> StringValues.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"].ToString();
|
=> StringValues.IsNullOrEmpty(request.Headers["X-Forwarded-For"]) ? null : request.Headers["X-Forwarded-For"].ToString();
|
||||||
|
|
||||||
@ -142,19 +140,6 @@ namespace Emby.Server.Implementations.SocketSharp
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static bool ContainsNonAsciiChars(string token)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < token.Length; ++i)
|
|
||||||
{
|
|
||||||
if ((token[i] < 0x20) || (token[i] > 0x7e))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private string NormalizeIp(string ip)
|
private string NormalizeIp(string ip)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(ip))
|
if (!string.IsNullOrWhiteSpace(ip))
|
||||||
@ -171,8 +156,6 @@ namespace Emby.Server.Implementations.SocketSharp
|
|||||||
return ip;
|
return ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSecureConnection => request.IsHttps || XForwardedProtocol == "https";
|
|
||||||
|
|
||||||
public string[] AcceptTypes => request.Headers.GetCommaSeparatedValues(HeaderNames.Accept);
|
public string[] AcceptTypes => request.Headers.GetCommaSeparatedValues(HeaderNames.Accept);
|
||||||
|
|
||||||
private Dictionary<string, object> items;
|
private Dictionary<string, object> items;
|
||||||
|
@ -61,11 +61,6 @@ namespace MediaBrowser.Model.Services
|
|||||||
|
|
||||||
string AbsoluteUri { get; }
|
string AbsoluteUri { get; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The Remote Ip as reported by Request.UserHostAddress
|
|
||||||
/// </summary>
|
|
||||||
string UserHostAddress { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Remote Ip as reported by X-Forwarded-For, X-Real-IP or Request.UserHostAddress
|
/// The Remote Ip as reported by X-Forwarded-For, X-Real-IP or Request.UserHostAddress
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -76,11 +71,6 @@ namespace MediaBrowser.Model.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
string Authorization { get; }
|
string Authorization { get; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// e.g. is https or not
|
|
||||||
/// </summary>
|
|
||||||
bool IsSecureConnection { get; }
|
|
||||||
|
|
||||||
string[] AcceptTypes { get; }
|
string[] AcceptTypes { get; }
|
||||||
|
|
||||||
string PathInfo { get; }
|
string PathInfo { get; }
|
||||||
|
Loading…
Reference in New Issue
Block a user