Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c4cec2b
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jan 5, 2023
39eb9af
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jan 6, 2023
a90f854
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jan 6, 2023
cbfc870
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jan 8, 2023
557b0aa
React to SDK change around linking
ViktorHofer Jan 9, 2023
52f4937
Update NetCoreAppToolCurrent to net8.0
ViktorHofer Jan 9, 2023
9b623ae
Upgrade aspnetcoretoolcurrent as well
ViktorHofer Jan 9, 2023
af2698d
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jan 9, 2023
10039ab
[wasm] WasmAppHost: fix new analyzer warning
radical Jan 9, 2023
08e6984
Merge remote-tracking branch 'origin/main' into darc-main-aab430d2-d9…
radical Jan 9, 2023
8342ded
Fix CA1512 analyzer warnings
radical Jan 9, 2023
11b736e
fix
radical Jan 9, 2023
1fea7d7
React to aspnetcore analyzers
ViktorHofer Jan 10, 2023
616dc0c
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jan 10, 2023
a65c046
Update tfm in WasmApp.LocalBuild.props
radical Jan 10, 2023
7295f8b
[wasm] Use dotnet version from global.json for helix
radical Jan 10, 2023
52b000b
Fix illink tests and react to analyzer
ViktorHofer Jan 11, 2023
978266d
Update hardcoded linker tfm
ViktorHofer Jan 11, 2023
003edf1
Fix illink tests
vitek-karas Jan 11, 2023
62d241c
Fix ILLinker tests on NativeAOT
ViktorHofer Jan 11, 2023
43b4d2c
Resolve analyzer warning in MonoLinkerTestsCasesExpectations
ViktorHofer Jan 11, 2023
38f62f6
Upgrade xunit runner tfm
ViktorHofer Jan 11, 2023
9dc60a2
Delete dead property
ViktorHofer Jan 11, 2023
ec5f16b
In NativeAOT common files with ILLink have ILLink format, meaning tab…
Jan 11, 2023
562cac4
Upgrade SDK because of "Failed to create CoreCLR"
ViktorHofer Jan 11, 2023
dbc28a7
Update macOS version target triple
ViktorHofer Jan 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
React to aspnetcore analyzers
  • Loading branch information
ViktorHofer committed Jan 10, 2023
commit 1fea7d74762c13837735a7636ab152623d377d26
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public static async Task InvokeAsync(HttpContext context)
{
string responseBody = "Sending DEFLATE compressed";

context.Response.Headers.Add("Content-MD5", Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody)));
context.Response.Headers.Add("Content-Encoding", "deflate");
context.Response.Headers["Content-MD5"] = Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody));
context.Response.Headers["Content-Encoding"] = "deflate";

context.Response.ContentType = "text/plain";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static async Task InvokeAsync(HttpContext context)
}

// Add original request method verb as a custom response header.
context.Response.Headers.Add("X-HttpRequest-Method", context.Request.Method);
context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method;

// Echo back JSON encoded payload.
RequestInformation info = await RequestInformation.CreateAsync(context.Request);
Expand All @@ -34,7 +34,7 @@ public static async Task InvokeAsync(HttpContext context)
byte[] hash = md5.ComputeHash(bytes);
string encodedHash = Convert.ToBase64String(hash);

context.Response.Headers.Add("Content-MD5", encodedHash);
context.Response.Headers["Content-MD5"] = encodedHash;
context.Response.ContentType = "application/json";
context.Response.ContentLength = bytes.Length;
await context.Response.Body.WriteAsync(bytes, 0, bytes.Length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public static async Task InvokeAsync(HttpContext context)
{
string responseBody = "Sending GZIP compressed";

context.Response.Headers.Add("Content-MD5", Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody)));
context.Response.Headers.Add("Content-Encoding", "gzip");
context.Response.Headers["Content-MD5"] = Convert.ToBase64String(ContentHelper.ComputeMD5Hash(responseBody));
context.Response.Headers["Content-Encoding"] = "gzip";

context.Response.ContentType = "text/plain";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static async Task InvokeAsync(HttpContext context)
}

// Add original request method verb as a custom response header.
context.Response.Headers.Add("X-HttpRequest-Method", context.Request.Method);
context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method;

var size = 1024;
if (context.Request.Query.TryGetValue("size", out var value))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,13 @@ public static void Invoke(HttpContext context)

if (hops <= 1)
{
context.Response.Headers.Add("Location", redirectUri);
context.Response.Headers["Location"] = redirectUri;
}
else
{
context.Response.Headers.Add(
"Location",
string.Format("/Redirect.ashx?uri={0}&hops={1}",
context.Response.Headers["Location"] = string.Format("/Redirect.ashx?uri={0}&hops={1}",
redirectUri,
hops - 1));
hops - 1);
}

context.Response.StatusCode = statusCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static async Task InvokeAsync(HttpContext context)
byte[] bytes = Encoding.ASCII.GetBytes(echoJson);
var hash = md5.ComputeHash(bytes);
string encodedHash = Convert.ToBase64String(hash);
context.Response.Headers.Add("Content-MD5", encodedHash);
context.Response.Headers["Content-MD5"] = encodedHash;

RequestInformation newEcho = RequestInformation.DeSerializeFromJson(echoJson);
context.Response.ContentType = "text/plain"; //"application/json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ public class VerifyUploadHandler
public static async Task InvokeAsync(HttpContext context)
{
// Report back original request method verb.
context.Response.Headers.Add("X-HttpRequest-Method", context.Request.Method);
context.Response.Headers["X-HttpRequest-Method"] = context.Request.Method;

// Report back original entity-body related request headers.
string contentLength = context.Request.Headers["Content-Length"];
if (!string.IsNullOrEmpty(contentLength))
{
context.Response.Headers.Add("X-HttpRequest-Headers-ContentLength", contentLength);
context.Response.Headers["X-HttpRequest-Headers-ContentLength"] = contentLength;
}

string transferEncoding = context.Request.Headers["Transfer-Encoding"];
if (!string.IsNullOrEmpty(transferEncoding))
{
context.Response.Headers.Add("X-HttpRequest-Headers-TransferEncoding", transferEncoding);
context.Response.Headers["X-HttpRequest-Headers-TransferEncoding"] = transferEncoding;
}

// Get request body.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static bool HandleBasicAuthentication(HttpContext context, string user,
if (authHeader == null)
{
context.Response.StatusCode = 401;
context.Response.Headers.Add("WWW-Authenticate", WwwAuthenticateHeaderValue);
context.Response.Headers["WWW-Authenticate"] = WwwAuthenticateHeaderValue;
return false;
}

Expand Down Expand Up @@ -82,7 +82,7 @@ private static bool HandleBasicAuthentication(HttpContext context, string user,
if (pair.Length != 2 || pair[0] != user || pair[1] != password)
{
context.Response.StatusCode = 401;
context.Response.Headers.Add("WWW-Authenticate", WwwAuthenticateHeaderValue);
context.Response.Headers["WWW-Authenticate"] = WwwAuthenticateHeaderValue;
return false;
}

Expand All @@ -100,7 +100,7 @@ private static bool HandleChallengeResponseAuthentication(
if (authHeader == null)
{
context.Response.StatusCode = 401;
context.Response.Headers.Add("WWW-Authenticate", authType);
context.Response.Headers["WWW-Authenticate"] = authType;
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void AddResponseCookies(HttpContext context)
{
if (string.Equals(pair.Key, "X-SetCookie", StringComparison.OrdinalIgnoreCase))
{
context.Response.Headers.Add("Set-Cookie", pair.Value.ToString());
context.Response.Headers["Set-Cookie"] = pair.Value.ToString();
}
}
}
Expand Down