Merge pull request #290 from usbharu/bugfix/failed-to-fetch-nodeinfo

nodeinfoの取得に失敗する問題を修正
This commit is contained in:
usbharu 2024-02-24 15:58:50 +09:00 committed by GitHub
commit 74f0426e54
1 changed files with 1 additions and 1 deletions

View File

@ -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)