Closed a1exsh closed 2 years ago
the PR is transforming from counting actual values (compressed bytes) to non-compressed, is it the intention?
the PR is transforming from counting actual values (compressed bytes) to non-compressed, is it the intention?
It is not intentional, but I thought it might be useful to measure both compressed and original size of both request and response. Btw, it doesn't look like we support zstd compression for response — only for request.
@a1exsh yes, zstd response compression is not supported
@antban Counting actual bytes on the uncompressed stream is the only reliable way to do it on this level, as the Content-Length
header is only set by some of the user agents (and they are not required to set it anyway). If we want to track compressed sizes as well, we should be doing that on the compression filter level.
👍
:+1:
:+1:
:+1:
:+1:
:+1:
Some user agents set the Content-Length header, but not all. Use request and response wrapper class together with counting input/output stream wrappers.