mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 16:20:13 +00:00
fix: correctly check avatar size
This commit is contained in:
parent
65cb937e07
commit
b8bd53f3c0
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
@ -31,7 +31,7 @@ namespace PluralKit.Bot {
|
||||||
|
|
||||||
url = TryRewriteCdnUrl(url);
|
url = TryRewriteCdnUrl(url);
|
||||||
|
|
||||||
var response = await client.GetAsync(uri);
|
var response = await client.GetAsync(url);
|
||||||
if (!response.IsSuccessStatusCode) // Check status code
|
if (!response.IsSuccessStatusCode) // Check status code
|
||||||
throw Errors.AvatarServerError(response.StatusCode);
|
throw Errors.AvatarServerError(response.StatusCode);
|
||||||
if (response.Content.Headers.ContentLength == null) // Check presence of content length
|
if (response.Content.Headers.ContentLength == null) // Check presence of content length
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue