Forum Discussion
33boston_223
Nimbostratus
Jan 15, 2009Gzip compression levels
Hi - New to irules so I was hoping someone could help with what I need to aaccomplish.
We would like to apply a higher compression level to any .aspx requests. How would I go about doing this? Is there a way to create an iRule that would read the content being .aspx and apply this higher level of compression while keeping the compression level in the profile the same for all other traffic?
Thanks!
5 Replies
- Nicolas_Menant
Employee
hi,when HTTP_REQUEST { if {[HTTP::path] ends_with ".aspx"} { COMPRESS::gzip level 5 } }
- 33boston_223
Nimbostratus
Hi - Thank you for the quick response. I tried the rule you suggested and it returned some errors. I've been continuing to look and found this - Deb_Allen_18Historic F5 Accountyep, that looks like it will do the trick. Might need to use "contains" operator, you should be able to tell by looking @ the headers sent by the server.
- 33boston_223
Nimbostratus
Hi- This is what I was getting- line 3: [command is not valid in current event context (HTTP_REQUEST)] [COMPRESS::gzip level 5] - Nicolas_Menant
Employee
it is a strange error message since based on the WIKI you should be allow to use it within HTTP_REQUEST... maybe you are not authorized and can only do it in the responsewhen CLIENT_ACCEPTED { set increase_compress 0 } when HTTP_REQUEST { if {[HTTP::path] ends_with ".aspx"} { set increase_compress 1 } else { set increase_compress 0 } } when HTTP_RESPONSE { if {$increase_compress equals "1"} { COMPRESS::gzip level 5 } }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects