From b8bd53f3c0ecf151da609ea0e8d3de013aaf7e0b Mon Sep 17 00:00:00 2001 From: spiral Date: Fri, 6 Aug 2021 21:41:18 -0400 Subject: [PATCH] fix: correctly check avatar size --- PluralKit.Bot/Utils/AvatarUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Utils/AvatarUtils.cs b/PluralKit.Bot/Utils/AvatarUtils.cs index ebde651f..9f3f20a9 100644 --- a/PluralKit.Bot/Utils/AvatarUtils.cs +++ b/PluralKit.Bot/Utils/AvatarUtils.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Net.Http; using System.Text.RegularExpressions; @@ -31,7 +31,7 @@ namespace PluralKit.Bot { url = TryRewriteCdnUrl(url); - var response = await client.GetAsync(uri); + var response = await client.GetAsync(url); if (!response.IsSuccessStatusCode) // Check status code throw Errors.AvatarServerError(response.StatusCode); if (response.Content.Headers.ContentLength == null) // Check presence of content length