From 5257f23a36e83ba196889ba6fa23472aceba1e4f Mon Sep 17 00:00:00 2001 From: Saturn225 <101260782+Saturn225@users.noreply.github.com> Date: Tue, 1 Oct 2024 23:07:13 +0530 Subject: [PATCH] remove netty exceptions added --- .../src/main/scala/zio/http/netty/model/Conversions.scala | 8 -------- 1 file changed, 8 deletions(-) diff --git a/zio-http/jvm/src/main/scala/zio/http/netty/model/Conversions.scala b/zio-http/jvm/src/main/scala/zio/http/netty/model/Conversions.scala index a67cacc879..374c9ba27f 100644 --- a/zio-http/jvm/src/main/scala/zio/http/netty/model/Conversions.scala +++ b/zio-http/jvm/src/main/scala/zio/http/netty/model/Conversions.scala @@ -71,10 +71,6 @@ private[netty] object Conversions { url0.relative.addLeadingSlash.encode } - private def validateHeaderValue(value: String): Boolean = { - value.contains('\r') || value.contains('\n') || value.contains('\u0000') - } - private def nettyHeadersIterator(headers: HttpHeaders): Iterator[Header] = new AbstractIterator[Header] { private val nettyIterator = headers.iteratorCharSequence() @@ -103,10 +99,6 @@ private[netty] object Conversions { while (iter.hasNext) { val header = iter.next() val name = header.headerName - val value = header.renderedValueAsCharSequence.toString - if (validateHeaderValue(value)) { - throw new IllegalArgumentException(s"Invalid header value containing prohibited characters in header $name") - } if (name == setCookieName) { nettyHeaders.add(name, header.renderedValueAsCharSequence) } else {