diff --git a/zio-http/shared/src/main/scala/zio/http/Header.scala b/zio-http/shared/src/main/scala/zio/http/Header.scala index 48a87bb8ad..1e20f26db8 100644 --- a/zio-http/shared/src/main/scala/zio/http/Header.scala +++ b/zio-http/shared/src/main/scala/zio/http/Header.scala @@ -1088,7 +1088,7 @@ object Header { private def parseBasic(value: String): Either[String, Authorization] = { try { - val partsOfBasic = new String(Base64.getDecoder.decode(value)).split(":") + val partsOfBasic = new String(Base64.getDecoder.decode(value)).split(":", 2) if (partsOfBasic.length == 2) { Right(Basic(partsOfBasic(0), Secret(partsOfBasic(1)))) } else {