Skip to content

Commit 3fcf045

Browse files
committed
Removed content-length for gzipped encodings. Fixes #358
1 parent 3425774 commit 3fcf045

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ServiceControl/Infrastructure/Nancy/NancyCompressionExtension.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ static void CompressResponse(Response response)
3636
{
3737
response.Headers["Content-Encoding"] = "gzip";
3838

39+
// Content length needs to be recalculated, but isn't needed, so drop it.
40+
response.Headers.Remove("Content-Length");
41+
3942
var contents = response.Contents;
4043
response.Contents = responseStream =>
4144
{

0 commit comments

Comments
 (0)