Commit 9397709b authored by justcoding121's avatar justcoding121

set ToUpper for Method

parent 63a8d938
...@@ -78,7 +78,7 @@ namespace Titanium.Web.Proxy.Examples.Basic ...@@ -78,7 +78,7 @@ namespace Titanium.Web.Proxy.Examples.Basic
////read request headers ////read request headers
var requestHeaders = e.WebSession.Request.RequestHeaders; var requestHeaders = e.WebSession.Request.RequestHeaders;
if ((e.WebSession.Request.Method.ToUpper() == "POST" || e.WebSession.Request.Method.ToUpper() == "PUT")) if ((e.WebSession.Request.Method == "POST" || e.WebSession.Request.Method == "PUT"))
{ {
//Get/Set request body bytes //Get/Set request body bytes
byte[] bodyBytes = await e.GetRequestBody(); byte[] bodyBytes = await e.GetRequestBody();
......
...@@ -102,7 +102,7 @@ Sample request and response event handlers ...@@ -102,7 +102,7 @@ Sample request and response event handlers
////read request headers ////read request headers
var requestHeaders = e.WebSession.Request.RequestHeaders; var requestHeaders = e.WebSession.Request.RequestHeaders;
if ((e.WebSession.Request.Method.ToUpper() == "POST" || e.WebSession.Request.Method.ToUpper() == "PUT")) if ((e.WebSession.Request.Method == "POST" || e.WebSession.Request.Method == "PUT"))
{ {
//Get/Set request body bytes //Get/Set request body bytes
byte[] bodyBytes = await e.GetRequestBody(); byte[] bodyBytes = await e.GetRequestBody();
......
...@@ -288,7 +288,7 @@ namespace Titanium.Web.Proxy ...@@ -288,7 +288,7 @@ namespace Titanium.Web.Proxy
args.WebSession.Request.RequestUri = httpRemoteUri; args.WebSession.Request.RequestUri = httpRemoteUri;
args.WebSession.Request.Method = httpMethod; args.WebSession.Request.Method = httpMethod.Trim().ToUpper();
args.WebSession.Request.HttpVersion = httpVersion; args.WebSession.Request.HttpVersion = httpVersion;
args.ProxyClient.ClientStream = clientStream; args.ProxyClient.ClientStream = clientStream;
args.ProxyClient.ClientStreamReader = clientStreamReader; args.ProxyClient.ClientStreamReader = clientStreamReader;
......
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