From 5692c62fe508ad243a0ce9d9a0ed72d089afb2a0 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 24 Feb 2024 15:51:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20nodeinfo=E3=81=AE=E5=8F=96=E5=BE=97?= =?UTF-8?q?=E3=81=AB=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hideout/core/service/resource/KtorResourceResolveService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/core/service/resource/KtorResourceResolveService.kt b/src/main/kotlin/dev/usbharu/hideout/core/service/resource/KtorResourceResolveService.kt index 5a19ec81..f8407b23 100644 --- a/src/main/kotlin/dev/usbharu/hideout/core/service/resource/KtorResourceResolveService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/core/service/resource/KtorResourceResolveService.kt @@ -43,7 +43,7 @@ class KtorResourceResolveService( protected suspend fun runResolve(url: String): ResolveResponse { val httpResponse = httpClient.get(url) val contentLength = httpResponse.contentLength() - if ((contentLength ?: sizeLimit) >= sizeLimit) { + if ((contentLength ?: 0) >= sizeLimit) { throw RemoteMediaFileSizeException("File size is too large. $contentLength >= $sizeLimit") } return KtorResolveResponse(httpResponse)