Commit acb334ac authored by justcoding121's avatar justcoding121 Committed by justcoding121

expose some more public properties

parent 22345d87
......@@ -33,9 +33,11 @@ namespace Titanium.Web.Proxy.Http
public bool HasBody => Method == "POST" || Method == "PUT" || Method == "PATCH";
/// <summary>
/// Request Http hostanem
/// Http hostname header value if exists
/// Note: Changing this does NOT change host in RequestUri
/// Users can set new RequestUri separately
/// </summary>
internal string Host
public string Host
{
get
{
......@@ -57,9 +59,9 @@ namespace Titanium.Web.Proxy.Http
}
/// <summary>
/// Request content encoding
/// Content encoding header value
/// </summary>
internal string ContentEncoding
public string ContentEncoding
{
get
{
......@@ -231,7 +233,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// Encoding for this request
/// </summary>
internal Encoding Encoding => this.GetEncoding();
public Encoding Encoding => this.GetEncoding();
/// <summary>
/// Terminates the underlying Tcp Connection to client after current request
......@@ -261,7 +263,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// Does this request has an upgrade to websocket header?
/// </summary>
internal bool UpgradeToWebSocket
public bool UpgradeToWebSocket
{
get
{
......
......@@ -23,12 +23,15 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
public string ResponseStatusDescription { get; set; }
internal Encoding Encoding => this.GetResponseCharacterEncoding();
/// <summary>
/// Encoding used in response
/// </summary>
public Encoding Encoding => this.GetResponseCharacterEncoding();
/// <summary>
/// Content encoding for this response
/// </summary>
internal string ContentEncoding
public string ContentEncoding
{
get
{
......@@ -41,12 +44,15 @@ namespace Titanium.Web.Proxy.Http
}
}
internal Version HttpVersion { get; set; }
/// <summary>
/// Http version
/// </summary>
public Version HttpVersion { get; set; }
/// <summary>
/// Keep the connection alive?
/// </summary>
internal bool ResponseKeepAlive
public bool ResponseKeepAlive
{
get
{
......@@ -89,7 +95,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// Length of response body
/// </summary>
internal long ContentLength
public long ContentLength
{
get
{
......@@ -142,7 +148,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// Response transfer-encoding is chunked?
/// </summary>
internal bool IsChunked
public bool IsChunked
{
get
{
......@@ -198,14 +204,8 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
public Dictionary<string, List<HttpHeader>> NonUniqueResponseHeaders { get; set; }
/// <summary>
/// Response network stream
/// </summary>
public Stream ResponseStream { get; set; }
/// <summary>
/// response body contenst as byte array
/// response body content as byte array
/// </summary>
internal byte[] ResponseBody { get; set; }
......
......@@ -31,11 +31,6 @@ namespace Titanium.Web.Proxy
//read response & headers from server
await args.WebSession.ReceiveResponse();
if (!args.WebSession.Response.ResponseBodyRead)
{
args.WebSession.Response.ResponseStream = args.WebSession.ServerConnection.Stream;
}
//check for windows authentication
if(EnableWinAuth
&& !RunTime.IsRunningOnMono
......
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