Author Topic: HOWTO: turning off server compression  (Read 1836 times)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 18
HOWTO: turning off server compression
« on: February 29, 2008, 11:10:16 PM »
Problem:  The system doesn't modify content that is already compressed before being received
Solution:  Tested with 8.1 build 32.1, but should apply to 7.0+ with little modification

add rewrite action "remove-ae" delete_http_header "Accept-Encoding"
add rewrite policy "remove-ae" true "remove-ae"
bind rewrite global "remove-ae" 10 NEXT -type REQ_DEFAULT

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 373
  • Karma: 22
Re: HOWTO: turning off server compression
« Reply #1 on: April 07, 2008, 01:35:16 PM »
If you remove the Accept-Encoding header will the NS compress the response?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 18
Re: HOWTO: turning off server compression
« Reply #2 on: April 07, 2008, 08:06:41 PM »
Yep, the NS itself will parse and flag the request as compression acceptable--it will remove the header right before sending it to the server itself.  In the response chain, things are a little different, as rewrite is the first (not last) thing processing, so you can control response-side behaviors in the NS with rewrite.

The Oracle