Skip to content

Commit b875731

Browse files
Minor cleanup.
1 parent ae90cdf commit b875731

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/ImageSharp.Web/CaseHandlingUriBuilder.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ public static string BuildAbsolute(
133133
/// <param name="uri">The Uri to encode.</param>
134134
/// <returns>The encoded string version of <paramref name="uri"/>.</returns>
135135
public static string Encode(CaseHandling handling, string uri)
136-
=> Encode(handling, new Uri(uri, UriKind.RelativeOrAbsolute));
136+
{
137+
Guard.NotNull(uri, nameof(uri));
138+
return Encode(handling, new Uri(uri, UriKind.RelativeOrAbsolute));
139+
}
137140

138141
/// <summary>
139142
/// Generates a string from the given absolute or relative Uri that is appropriately encoded for use in

tests/ImageSharp.Web.Tests/TestUtilities/AuthenticatedServerTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public async Task CanRejectUnauthorizedRequestAsync()
3737
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
3838

3939
// Now send an invalid token
40-
response = await this.HttpClient.GetAsync(url + this.Fixture.Commands[0] + "&" + HMACUtilities.TokenCommand + "=INVALID");
40+
response = await this.HttpClient.GetAsync(url + this.Fixture.Commands[0] + "&" + ImageSharpRequestAuthorizationUtilities.TokenCommand + "=INVALID");
4141
Assert.NotNull(response);
4242
Assert.False(response.IsSuccessStatusCode);
4343
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);

0 commit comments

Comments
 (0)