fix: correctly check avatar size
This commit is contained in:
parent
65cb937e07
commit
b8bd53f3c0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user