# Content length after compression

**URL:** <https://community.f5.com/t/content-length-after-compression/61407>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [March 12, 2013, 3:31pm UTC](https://community.f5.com/t/content-length-after-compression/61407 "2013-03-12T15:31:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DP](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@DP](https://community.f5.com/u/DP)\
**Post date:** [March 12, 2013, 3:31pm UTC](https://community.f5.com/t/content-length-after-compression/61407/1 "2013-03-12T15:31:41Z")

</div>

Hi.

Does anyone know of a way to get HTTP content length after compression has been completed?

We’re running Big-IP 10.2.4 currently and the HTTP\_RESPONSE event gives the uncompressed size of an object from the pool member by reading the HTTP Content-Length header.

With Big-IP 11.x there’s a HTTP\_RESPONSE\_RELEASE event which I think would do the job but unfortunately we’re not running that release.

It’s for bandwidth monitoring of content types and sizes.

Cheers.

---

<div class="post-metadata">

**Author:** ![nitass](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nitass/32/2270_2.png) [@nitass](https://community.f5.com/u/nitass)\
**Post date:** [March 13, 2013, 4:02am UTC](https://community.f5.com/t/content-length-after-compression/61407/2 "2013-03-13T04:02:25Z")

</div>

is vip-to-vip helpful? the solution is for asm but concept is same.

sol9388: Using an iRule to parse post-ASM responses (9.4.x - 10.x)

> **[404 Page not found | BIG-IP Documentation](https://techdocs.f5.com/kb/en-us/solutions/public/9000/300/sol9388.html?sr=27975946)**
>
> Usage information and technical documentation for BIG-IP and other related F5 products

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [March 13, 2013, 4:08pm UTC](https://community.f5.com/t/content-length-after-compression/61407/3 "2013-03-13T16:08:28Z")

</div>

As Nitass says, until you get to v11, VIP-targeting is probably you’re best bet.

```tcl
Outer VIP:
when HTTP_REQUEST {
virtual internal.vip.vs
}
when HTTP_RESPONSE {
log local0. [HTTP::header Content-Length]
}

```
