From f4b2b3fd839eb6c99097d2ff246c44126eddea0b Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sat, 6 Jan 2024 16:38:49 +0100 Subject: [PATCH] Add missing method to ArrayBody (#2585) --- zio-http/src/main/scala/zio/http/Body.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zio-http/src/main/scala/zio/http/Body.scala b/zio-http/src/main/scala/zio/http/Body.scala index d3a9de1cbd..a41d0f3d54 100644 --- a/zio-http/src/main/scala/zio/http/Body.scala +++ b/zio-http/src/main/scala/zio/http/Body.scala @@ -360,6 +360,8 @@ object Body { override def contentType(newMediaType: MediaType, newBoundary: Boundary): Body = copy(mediaType = Some(newMediaType), boundary = boundary.orElse(Some(newBoundary))) + + override def knownContentLength: Option[Long] = Some(data.length.toLong) } private[zio] final case class FileBody(