Commit 5fb387be authored by justcoding121's avatar justcoding121

cleanup

parent 1dd43e7b
......@@ -111,8 +111,7 @@ namespace Titanium.Web.Proxy.EventArguments
private async Task ReadRequestBody()
{
//GET request don't have a request body to read
var method = WebSession.Request.Method.ToUpper();
if (method != "POST" && method != "PUT" && method != "PATCH")
if (!WebSession.Request.HasBody)
{
throw new BodyNotFoundException("Request don't have a body. " +
"Please verify that this request is a Http POST/PUT/PATCH and request " +
......
......@@ -8,12 +8,15 @@ namespace Titanium.Web.Proxy.Helpers
internal class RunTime
{
/// <summary>
/// Checks if current run time is Mono
/// cache for mono runtime check
/// </summary>
/// <returns></returns>
internal static Lazy<bool> isRunningOnMono
private static Lazy<bool> isRunningOnMono
= new Lazy<bool>(()=> Type.GetType("Mono.Runtime") != null);
/// <summary>
/// Is running on Mono?
/// </summary>
internal static bool IsRunningOnMono => isRunningOnMono.Value;
}
}
......@@ -476,6 +476,7 @@ namespace Titanium.Web.Proxy
if (!RunTime.IsRunningOnMono)
{
//clear orphaned windows auth states every 2 minutes
WinAuthEndPoint.ClearIdleStates(2);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment