Forum Discussion
James_Yang_9981
Altostratus
Nov 20, 2007remove accept-encoding header on WAM 4500
I'm currently implement WA 4500 in customer's envionment, their server has enabled compress. after WA online, I think it's better to disable server compress that will cause WA use more CPU power to decompress the content and compress it again. for failover issue, customer doesn't want to disable compress on OWS. So, the best way to do it is remove the accept-encoding header when WA send request to OWS.
the problem I meet is when I using the following rules:
when HTTP_REQUEST_SEND {
if {[HTTP::header exists "Accept-Encoding"]}{
HTTP::header remove "Accept-Encoding"
}
}
it will not work at all, error message is:
Nov 20 18:34:25 tmm tmm[7847]: 01220001:3: TCL error: removeencoding - Illegal argument. Can't execute in the current context. (line 1) invoked from within "HTTP::header exists "Accept-Encoding""
if I change the event to HTTP_REQUEST, it will work but client received the uncompressed response data.
from the wiki document, HTTP::header is supported in HTTP_REQUEST_SEND event.
any idea?
Thanks
- hoolio
Cirrostratus
Hi,when HTTP_REQUEST_SEND { clientside { if {[HTTP::header exists "Accept-Encoding"]}{ HTTP::header remove "Accept-Encoding" } } }
when HTTP_REQUEST_SEND { if {clientside {HTTP::header exists "Accept-Encoding"}}{ clientside {HTTP::header remove "Accept-Encoding"} } }
- James_Yang_9981
Altostratus
Thanks response, but it doesn't work and just like remove the header in HTTP_REQUEST event.when HTTP_REQUEST { if {[HTTP::header exists "X-PvMAC"]} { if {[HTTP::header exists "Accept-Encoding"]}{ HTTP::header remove "Accept-Encoding" } } }
- hoolio
Cirrostratus
If you don't need to use the HTTP_REQUEST_DATA event, that method is cleaner. I have successfully tested using the clientside command with HTTP::header commands in the HTTP_REQUEST_DATA event though. Maybe the issue is something new with 9.4.2 or 9.4.3? - James_Yang_9981
Altostratus
not sure, may because of the internal VS of WA.
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