mirror of https://github.com/usbharu/Hideout.git
fix: nodeinfoの取得に失敗する問題を修正
This commit is contained in:
parent
a242748908
commit
5692c62fe5
|
@ -43,7 +43,7 @@ class KtorResourceResolveService(
|
||||||
protected suspend fun runResolve(url: String): ResolveResponse {
|
protected suspend fun runResolve(url: String): ResolveResponse {
|
||||||
val httpResponse = httpClient.get(url)
|
val httpResponse = httpClient.get(url)
|
||||||
val contentLength = httpResponse.contentLength()
|
val contentLength = httpResponse.contentLength()
|
||||||
if ((contentLength ?: sizeLimit) >= sizeLimit) {
|
if ((contentLength ?: 0) >= sizeLimit) {
|
||||||
throw RemoteMediaFileSizeException("File size is too large. $contentLength >= $sizeLimit")
|
throw RemoteMediaFileSizeException("File size is too large. $contentLength >= $sizeLimit")
|
||||||
}
|
}
|
||||||
return KtorResolveResponse(httpResponse)
|
return KtorResolveResponse(httpResponse)
|
||||||
|
|
Loading…
Reference in New Issue