Forum Discussion
Size after compression
Hi Tomer,
you may take a look to the provided iRule posted in this topic...
https://devcentral.f5.com/questions/how-to-get-the-response-size-after-gzip-compression-49060?tag=irules
It uses the HTTP_REQUEST event to inspect the Content-Lenght before compression and the HTTP_RESPONSE_RELEASE event to inspect the Content-Lenght after compression and performs additional math to calculate the compression rate.
Note: Keep in mind, that HTTP responses with chunked HTTP content will not include a Content-Lenght header. It will be very hard to account the size for those requests... See https://en.wikipedia.org/wiki/Chunked_transfer_encoding for further information
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com