Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Commit

Permalink
NettyModelConversion (l.189) computes the content length it self
Browse files Browse the repository at this point in the history
- when the length is provided manually, it reports either
  info or warning log. either way, it ignores provided length
  • Loading branch information
KarelCemus committed Mar 28, 2016
1 parent 1aaa333 commit e8eef92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/com/mohiva/play/compressor/CompressorFilter.scala
Expand Up @@ -95,7 +95,7 @@ abstract class CompressorFilter[C <: Compressor] extends Filter {
val compressed = compress(bytes)
val length = compressed.length
Result(
result.header.copy(headers = result.header.headers ++ Map(CONTENT_LENGTH -> length.toString)),
result.header.copy(headers = result.header.headers),
HttpEntity.Streamed(Source.single(ByteString(compressed)), Some(length.toLong), result.body.contentType)
)
}
Expand Down

0 comments on commit e8eef92

Please sign in to comment.