Skip to content

Commit

Permalink
http (fix): Fix a bug in HttpMultiMap.add() when more than 3 values a…
Browse files Browse the repository at this point in the history
…re added with the same key (#3761)
  • Loading branch information
takezoe authored Dec 17, 2024
1 parent cd32bb9 commit 0fc097f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ case class HttpMultiMap(private val underlying: Map[String, Any] = Map.empty) {
.map { entry =>
val newValue = entry._2 match {
case s: String => Seq(s, value)
case lst: Seq[String @unchecked] => lst +: value
case lst: Seq[String @unchecked] => lst :+ value
}
// Use the already existing key for avoid case-insensitive key duplication
underlying + (entry._1 -> newValue)
Expand Down

0 comments on commit 0fc097f

Please sign in to comment.