Rename "me" -> "request".
MODIFY
WalletWasabi/Tor/Http/Extensions/HttpRequestMessageExtensions.cs
WalletWasabi/Tor/Http/Extensions/HttpRequestMessageExtensions.cs
@@ -8,7 +8,7 @@ namespace WalletWasabi.Tor.Http.Extensions
{
public static class HttpRequestMessageExtensions
{
- public static async Task<string> ToHttpStringAsync(this HttpRequestMessage me)
+ public static async Task<string> ToHttpStringAsync(this HttpRequestMessage request)
{
// https://tools.ietf.org/html/rfc7230#section-5.4
// The "Host" header field in a request provides the host and port
@@ -17,9 +17,9 @@ namespace WalletWasabi.Tor.Http.Extensions
// host names on a single IP address.
// Host = uri - host[":" port] ; Section 2.7.1
// A client MUST send a Host header field in all HTTP/1.1 request messages.
- if (me.Method != new HttpMethod("CONNECT"))
+ if (request.Method != new HttpMethod("CONNECT"))
{
- if (!me.Headers.Contains("Host"))
+ if (!request.Headers.Contains("Host"))
{
// https://tools.ietf.org/html/rfc7230#section-5.4
// If the target URI includes an authority component, then a
@@ -28,29 +28,29 @@ namespace WalletWasabi.Tor.Http.Extensions
// delimiter(Section 2.7.1).If the authority component is missing or
// undefined for the target URI, then a client MUST send a Host header
// field with an empty field - value.
- me.Headers.TryAddWithoutValidation("Host", me.RequestUri.Authority);
+ request.Headers.TryAddWithoutValidation("Host", request.RequestUri.Authority);
}
}
- var startLine = new RequestLine(me.Method, me.RequestUri, new HttpProtocol($"HTTP/{me.Version.Major}.{me.Version.Minor}")).ToString();
+ var startLine = new RequestLine(request.Method, request.RequestUri, new HttpProtocol($"HTTP/{request.Version.Major}.{request.Version.Minor}")).ToString();
string headers = "";
- if (me.Headers.NotNullAndNotEmpty())
+ if (request.Headers.NotNullAndNotEmpty())
{
- var headerSection = HeaderSection.CreateNew(me.Headers);
+ var headerSection = HeaderSection.CreateNew(request.Headers);
headers += headerSection.ToString(endWithTwoCRLF: false);
}
string messageBody = "";
- if (me.Content is { })
+ if (request.Content is { })
{
- if (me.Content.Headers.NotNullAndNotEmpty())
+ if (request.Content.Headers.NotNullAndNotEmpty())
{
- var headerSection = HeaderSection.CreateNew(me.Content.Headers);
+ var headerSection = HeaderSection.CreateNew(request.Content.Headers);
headers += headerSection.ToString(endWithTwoCRLF: false);
}
- messageBody = await me.Content.ReadAsStringAsync().ConfigureAwait(false);
+ messageBody = await request.Content.ReadAsStringAsync().ConfigureAwait(false);
}
return startLine + headers + CRLF + messageBody;

Rename "me" -> "request".