Scala : Negative content length