mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-27 06:01:08 +08:00
fix: not all responses have a length
This commit is contained in:
parent
666bb5a4b5
commit
626368bb34
@ -106,7 +106,8 @@ public class ImageProxyController {
|
||||
|
||||
private boolean contentTooLarge(final ClientResponse response) {
|
||||
final var contentLength = response.headers().contentLength();
|
||||
return contentLength.isEmpty() || contentLength.getAsLong() > 100_000_000;
|
||||
// not all responses have a length...
|
||||
return contentLength.isPresent() && contentLength.getAsLong() > 150_000_000;
|
||||
}
|
||||
|
||||
private boolean validContentType(final ClientResponse response) {
|
||||
|
Loading…
Reference in New Issue
Block a user