Nancy.Gzip icon indicating copy to clipboard operation
Nancy.Gzip copied to clipboard

ContentLengthIsTooSmall() seems to be useless

Open RhinoDevel opened this issue 8 years ago • 1 comments

Checking, if Content-Length is set in response header has no effect, because there never seem to be any headers set automatically by Nancy up to that moment.

I tried this with your example project, too.

Is there any other way to prevent compressing small responses?

RhinoDevel avatar Jul 06 '17 10:07 RhinoDevel

Checking, if Content-Length is set in response header has no effect, because there never seem to be any headers set automatically by Nancy up to that moment.

It looks like you can write this header property when you know the length of your response.

AntiTenzor avatar Sep 01 '22 07:09 AntiTenzor