Commit c60ab7ca authored by justcoding121's avatar justcoding121

add comments

parent 4f8a2170
......@@ -32,6 +32,11 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
private Func<SessionEventArgs, Task> httpResponseHandler;
/// <summary>
/// Backing field for corresponding public property
/// </summary>
private bool reRequest;
/// <summary>
/// Holds a reference to client
/// </summary>
......@@ -43,10 +48,24 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
public Guid Id => WebSession.RequestId;
/// <summary>
/// Should we send the request again
/// </summary>
public bool ReRequest { get; set; }
public bool ReRequest
{
get { return reRequest; }
set
{
if (WebSession.Response.ResponseStatusCode == null)
{
throw new Exception("Response status code is null. Cannot request again a request "
+ "which was never send to server.");
}
reRequest = value;
}
}
/// <summary>
/// Does this session uses SSL
......@@ -145,12 +164,12 @@ namespace Titanium.Web.Proxy.EventArguments
WebSession.Response.Dispose();
WebSession.Response = new Response();
}
/// <summary>
/// Read response body as byte[] for current response
/// </summary>
private async Task ReadResponseBody()
/// <summary>
/// Read response body as byte[] for current response
/// </summary>
private async Task ReadResponseBody()
{
//If not already read (not cached yet)
if (WebSession.Response.ResponseBody == null)
......
......@@ -242,8 +242,14 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
internal string RequestBodyString { get; set; }
/// <summary>
/// Request body was read by user?
/// </summary>
internal bool RequestBodyRead { get; set; }
/// <summary>
/// Request is ready to be sent (user callbacks are complete?)
/// </summary>
internal bool RequestLocked { get; set; }
/// <summary>
......
......@@ -213,7 +213,14 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
internal string ResponseBodyString { get; set; }
/// <summary>
/// Was response body read by user
/// </summary>
internal bool ResponseBodyRead { get; set; }
/// <summary>
/// Is response is no more modifyable by user (user callbacks complete?)
/// </summary>
internal bool ResponseLocked { get; set; }
/// <summary>
......
......@@ -37,9 +37,9 @@ namespace Titanium.Web.Proxy
}
//check for windows authentication
if(EnableWinAuth &&
args.WebSession.Response.ResponseStatusCode == "401"
&& !RunTime.IsRunningOnMono())
if(EnableWinAuth
&& !RunTime.IsRunningOnMono()
&& args.WebSession.Response.ResponseStatusCode == "401")
{
var disposed = await Handle401UnAuthorized(args);
......
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