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