Skip to content

Commit

Permalink
remove netty exceptions added
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn225 authored Oct 1, 2024
1 parent 943167c commit 5257f23
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 5257f23

Please sign in to comment.