James_Yang_9981
Nov 20, 2007Altostratus
remove 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